Merge pull request 'join' (#19) from join into staging
Reviewed-on: bip/sistem-desa-mandiri#19
This commit is contained in:
@@ -109,7 +109,10 @@ export async function PUT(request: Request, context: { params: { id: string } })
|
||||
|
||||
const cek = await prisma.position.count({
|
||||
where: {
|
||||
name: name,
|
||||
name: {
|
||||
equals: name,
|
||||
mode: "insensitive"
|
||||
},
|
||||
idGroup: idGroup,
|
||||
NOT: {
|
||||
id: id
|
||||
@@ -133,7 +136,7 @@ export async function PUT(request: Request, context: { params: { id: string } })
|
||||
} else {
|
||||
return NextResponse.json(
|
||||
{ success: false, message: "Jabatan sudah ada" },
|
||||
{ status: 400 }
|
||||
{ status: 200 }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ export async function GET(request: Request) {
|
||||
id: true,
|
||||
name: true,
|
||||
isActive: true,
|
||||
idGroup: true,
|
||||
Group: {
|
||||
select: {
|
||||
name: true
|
||||
|
||||
@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
return NextResponse.json({ success: true, version: "1.7.0", tahap: "beta", update: "-api mobile; -tambah laporan pada project dan tugas divisi; -tambah upload link pada project dan tugas divisi; -tambah detail tanggal dan jam pada project dan tugas divisi" }, { status: 200 });
|
||||
return NextResponse.json({ success: true, version: "1.7.1", tahap: "beta", update: "-api mobile; -tambah laporan pada project dan tugas divisi; -tambah upload link pada project dan tugas divisi; -tambah detail tanggal dan jam pada project dan tugas divisi" }, { status: 200 });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json({ success: false, version: "Gagal mendapatkan version, coba lagi nanti (error: 500)", reason: (error as Error).message, }, { status: 500 });
|
||||
|
||||
Reference in New Issue
Block a user