Membuat database menu desa: Berita & Pengummuman

This commit is contained in:
2025-04-22 21:48:01 +08:00
parent 7b0fb9332e
commit 9a6f8dc7f6
27 changed files with 838 additions and 101 deletions

View File

@@ -2,16 +2,17 @@ import prisma from "@/lib/prisma";
import cors, { HTTPMethod } from "@elysiajs/cors";
import swagger from "@elysiajs/swagger";
import { Elysia, t } from "elysia";
import getPotensi from "./_lib/get-potensi";
import img from "./_lib/img";
import fs from "fs/promises";
import path from "path";
import uplImg from "./_lib/upl-img";
import getPotensi from "./_lib/get-potensi";
import img from "./_lib/img";
import imgDel from "./_lib/img-del";
import imgs from "./_lib/imgs";
import uplCsv from "./_lib/upl-csv";
import imgDel from "./_lib/img-del";
import { uplImgSingle } from "./_lib/upl-img-single";
import { uplCsvSingle } from "./_lib/upl-csv-single";
import uplImg from "./_lib/upl-img";
import { uplImgSingle } from "./_lib/upl-img-single";
import Desa from "./_lib/desa";
const ROOT = process.cwd();
if (!process.env.WIBU_UPLOAD_DIR)
@@ -46,6 +47,7 @@ async function layanan() {
const ApiServer = new Elysia()
.use(swagger({ path: "/api/docs" }))
.use(cors(corsConfig))
.use(Desa)
.onError(({ code }) => {
if (code === "NOT_FOUND") {
return {