tamabahan

This commit is contained in:
bipproduction
2025-10-09 14:45:35 +08:00
parent 3d0bcea948
commit 6fe2e9a3fc
6 changed files with 29 additions and 140 deletions

View File

@@ -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