This commit is contained in:
bipproduction
2025-10-12 21:49:54 +08:00
parent 86d5b435f7
commit 9850fab34d
44 changed files with 8533 additions and 2108 deletions

View File

@@ -2,7 +2,8 @@ import Elysia, { t } from "elysia";
import { prisma } from "../lib/prisma";
const CredentialRoute = new Elysia({
prefix: "/credential"
prefix: "/credential",
tags: ["credential"],
})
.post("/create", async (ctx) => {
const { name, value } = ctx.body
@@ -26,7 +27,7 @@ const CredentialRoute = new Elysia({
description: 'create credential',
}
})
.get("/list", async (ctx) => {
.get("/list", async () => {
const list = await prisma.credential.findMany()
return {
message: "success",
@@ -40,7 +41,7 @@ const CredentialRoute = new Elysia({
})
.delete("/rm", async (ctx) => {
const { id } = ctx.body
const rm = await prisma.credential.delete({
await prisma.credential.delete({
where: {
id: id
}