Bagian Berita Di Admin Sudah Bisa Upload Di Bun Dev atau Bun Start

This commit is contained in:
2025-05-23 16:30:46 +08:00
parent ee9368e911
commit cf6a5422ec
13 changed files with 327 additions and 83 deletions

View File

@@ -6,13 +6,14 @@ type FormCreate = Prisma.BeritaGetPayload<{
select: {
judul: true;
deskripsi: true;
image: true;
content: true;
katagoryBeritaId: true;
kategoriBeritaId: true;
imageId: true;
};
}>;
async function beritaCreate(context: Context) {
const body = context.body as FormCreate;
console.log(body)
// console.log(body)
@@ -20,9 +21,9 @@ async function beritaCreate(context: Context) {
data: {
content: body.content,
deskripsi: body.deskripsi,
image: body.image,
imageId: body.imageId,
judul: body.judul,
katagoryBeritaId: body.katagoryBeritaId,
kategoriBeritaId: body.kategoriBeritaId,
},
});