feat : update search
Deskripsi: - search group - search position - search member / user / anggota No Issue
This commit is contained in:
@@ -10,6 +10,7 @@ export async function getAllUser(req: NextRequest) {
|
||||
const idGroup = searchParams.get("groupId");
|
||||
const active = searchParams.get("active");
|
||||
const user = await funGetUserByCookies();
|
||||
const name = searchParams.get("name")
|
||||
|
||||
if (idGroup == "null" || idGroup == undefined) {
|
||||
fixGroup = user.idGroup
|
||||
@@ -21,6 +22,10 @@ export async function getAllUser(req: NextRequest) {
|
||||
where: {
|
||||
isActive: active == "true" ? true : false,
|
||||
idGroup: String(fixGroup),
|
||||
name: {
|
||||
contains: String(name),
|
||||
mode: "insensitive",
|
||||
}
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
Reference in New Issue
Block a user