feat : update scroll and style

Deskripsi:
- update api
- update globle
- update project
- update user
- update profile

No Issue
This commit is contained in:
lukman
2024-09-19 13:41:04 +08:00
parent fe5155ee37
commit 6626f92ff1
7 changed files with 70 additions and 11 deletions

View File

@@ -14,6 +14,8 @@ export async function GET(request: Request) {
const name = searchParams.get('search')
const idGroup = searchParams.get("group");
const active = searchParams.get("active");
const page = searchParams.get('page');
const dataSkip = Number(page) * 5 - 5;
const user = await funGetUserByCookies()
if (user.id == undefined) {
return NextResponse.json({ success: false, message: "Anda harus login untuk mengakses ini" }, { status: 401 });
@@ -36,6 +38,8 @@ export async function GET(request: Request) {
const users = await prisma.user.findMany({
skip: dataSkip,
take: 5,
where: {
isActive: active == 'false' ? false : true,
idGroup: String(fixGroup),