tamabahan
This commit is contained in:
@@ -20,7 +20,11 @@ const CredentialRoute = new Elysia({
|
||||
body: t.Object({
|
||||
name: t.String(),
|
||||
value: t.String(),
|
||||
})
|
||||
}),
|
||||
detail: {
|
||||
summary: 'create',
|
||||
description: 'create credential',
|
||||
}
|
||||
})
|
||||
.get("/list", async (ctx) => {
|
||||
const list = await prisma.credential.findMany()
|
||||
@@ -28,6 +32,11 @@ const CredentialRoute = new Elysia({
|
||||
message: "success",
|
||||
list
|
||||
}
|
||||
}, {
|
||||
detail: {
|
||||
summary: 'list',
|
||||
description: 'get credential list',
|
||||
}
|
||||
})
|
||||
.delete("/rm", async (ctx) => {
|
||||
const { id } = ctx.body
|
||||
@@ -40,7 +49,11 @@ const CredentialRoute = new Elysia({
|
||||
}, {
|
||||
body: t.Object({
|
||||
id: t.String()
|
||||
})
|
||||
}),
|
||||
detail: {
|
||||
summary: 'rm',
|
||||
description: 'delete credential by id',
|
||||
}
|
||||
})
|
||||
|
||||
export default CredentialRoute
|
||||
Reference in New Issue
Block a user