tambah route texs

This commit is contained in:
bipproduction
2025-11-10 16:53:00 +08:00
parent aa89a10aa8
commit fca77c6bd8
2 changed files with 28 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ import LayananRoute from "./server/routes/layanan_route";
import { MCPRoute } from "./server/routes/mcp_route";
import PelayananRoute from "./server/routes/pelayanan_surat_route";
import PengaduanRoute from "./server/routes/pengaduan_route";
import TestRoute from "./server/routes/test";
import UserRoute from "./server/routes/user_route";
import cors from "@elysiajs/cors";
@@ -29,6 +30,7 @@ const Api = new Elysia({
})
.use(PengaduanRoute)
.use(PelayananRoute)
.use(TestRoute)
.use(apiAuth)
.use(ApiKeyRoute)
.use(DarmasabaRoute)

26
src/server/routes/test.ts Normal file
View File

@@ -0,0 +1,26 @@
import Elysia, { t } from "elysia";
const TestRoute = new Elysia({
prefix: "test",
tags: ["mcp", "test"],
}).post("/test-info-rapat", ({ body }) => {
return {
success: true,
message: "data info rapat berhasil diambil",
chunk: body.gambar.substring(22)
}
}, {
body: t.Object({
judul: t.String(),
tanggal: t.String(),
deskripsi: t.String(),
gambar: t.String(),
}),
detail: {
summary: "upload base64",
description: "upload base64",
}
})
export default TestRoute