fix: api document

Deskripsi:
- tidak menampilkan file sharea yg telah dihapus oleh pemilik file

- No Issues
This commit is contained in:
amel
2025-03-05 10:55:53 +08:00
parent db118fe707
commit 73f89711f2
2 changed files with 8 additions and 2 deletions

View File

@@ -46,7 +46,10 @@ export async function GET(request: Request) {
where: {
isActive: true,
idDivision: String(idDivision),
idDocument: String(path)
idDocument: String(path),
DivisionDocumentFolderFile: {
isActive: true
}
}
})
@@ -106,6 +109,9 @@ export async function GET(request: Request) {
where: {
isActive: true,
idDivision: String(idDivision),
DivisionDocumentFolderFile: {
isActive: true
}
},
select: {
DivisionDocumentFolderFile: {

View File

@@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
export async function GET(request: Request) {
try {
return NextResponse.json({ success: true, version: "1.2.5", tahap: "beta", update: "-fix api fitur divisi non aktif" }, { status: 200 });
return NextResponse.json({ success: true, version: "1.2.5", tahap: "beta", update: "-fix api fitur divisi non aktif, -fix api tampil file/dokumen yg telah dihapus" }, { 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 });