upd: apaa aja aku lupa
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { prisma } from "@/module/_global";
|
||||
import { funGetUserByCookies } from "@/module/auth";
|
||||
import { NextRequest } from "next/server";
|
||||
|
||||
export async function listGroups(req: NextRequest): Promise<Response> {
|
||||
|
||||
try {
|
||||
const user = await funGetUserByCookies()
|
||||
const searchParams = req.nextUrl.searchParams
|
||||
const villaId = "121212"
|
||||
const villaId = user.idVillage
|
||||
const active = searchParams.get('active');
|
||||
const groups = await prisma.group.findMany({
|
||||
where: {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { TypeGroup } from './lib/type_group';
|
||||
import { apiGroup } from "./api/api_group";
|
||||
import ViewGroup from "./view/view_group";
|
||||
|
||||
export { ViewGroup };
|
||||
export { apiGroup };
|
||||
export type { TypeGroup }
|
||||
|
||||
5
src/module/group/lib/type_group.ts
Normal file
5
src/module/group/lib/type_group.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type TypeGroup = {
|
||||
id: string
|
||||
name: string
|
||||
isActive: boolean
|
||||
}[]
|
||||
Reference in New Issue
Block a user