upd: update status api

Deskripsi:
update database
- update status success respon api group

No Issues
This commit is contained in:
amel
2024-07-29 12:00:49 +08:00
parent 5a03d259b1
commit 9dd8611992
4 changed files with 36 additions and 34 deletions

View File

@@ -2,7 +2,7 @@ import { prisma } from "@/module/_global";
import { NextRequest } from "next/server";
export async function listGroups(req: NextRequest): Promise<Response> {
try {
const searchParams = req.nextUrl.searchParams
const villaId = searchParams.get('villageId');
@@ -20,6 +20,6 @@ export async function listGroups(req: NextRequest): Promise<Response> {
return Response.json(groups);
} catch (error) {
console.error(error);
return Response.json({ message: "Internal Server Error" }, { status: 500 });
return Response.json({ success: false, message: "Internal Server Error" }, { status: 500 });
}
}