upd: divisi

Deskripsi:
- realtime create divisi

- fix list anggota klo bukan supadmin

No Issues
This commit is contained in:
amel
2024-10-02 12:22:17 +08:00
parent 2af2587ae4
commit 8d389bf4de
3 changed files with 20 additions and 5 deletions

View File

@@ -20,7 +20,8 @@ export async function GET(request: Request) {
if (user.id == undefined) {
return NextResponse.json({ success: false, message: "Anda harus login untuk mengakses ini" }, { status: 401 });
}
if (idGroup == "null" || idGroup == undefined) {
if (idGroup == "null" || idGroup == undefined || idGroup == "") {
fixGroup = user.idGroup
} else {
fixGroup = idGroup