feat : add group
This commit is contained in:
@@ -5,7 +5,7 @@ export async function listGroups(req: NextRequest): Promise<Response> {
|
||||
|
||||
try {
|
||||
const searchParams = req.nextUrl.searchParams
|
||||
const villaId = "121212"
|
||||
const villaId = "desa1"
|
||||
const active = searchParams.get('active');
|
||||
const groups = await prisma.group.findMany({
|
||||
where: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { revalidatePath } from "next/cache";
|
||||
export async function createGroup(req: Request) {
|
||||
try {
|
||||
const data = await req.json();
|
||||
const villaId = "121212";
|
||||
const villaId = "desa1";
|
||||
|
||||
if (!data || !data.name) {
|
||||
return Response.json(
|
||||
|
||||
Reference in New Issue
Block a user