change selfie with ktp to selfie with setrip tag
This commit is contained in:
@@ -38,7 +38,7 @@ export async function GET(_req: NextRequest, ctx: RouteCtx) {
|
||||
return NextResponse.json({ error: "Forbidden" }, { status: 403 });
|
||||
}
|
||||
|
||||
const key = kind === "ktp" ? verification.ktpImageKey : verification.selfieKey;
|
||||
const key = kind === "ktp" ? verification.ktpImageKey : verification.livenessKey;
|
||||
if (!key) {
|
||||
return NextResponse.json({ error: "File belum diunggah" }, { status: 404 });
|
||||
}
|
||||
|
||||
@@ -28,7 +28,10 @@ export async function POST(req: NextRequest) {
|
||||
const file = form.get("file");
|
||||
|
||||
if (!isKycKind(kind)) {
|
||||
return NextResponse.json({ error: "kind harus 'ktp' atau 'selfie'" }, { status: 400 });
|
||||
return NextResponse.json(
|
||||
{ error: "kind harus 'ktp' atau 'liveness'" },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
if (!(file instanceof File)) {
|
||||
return NextResponse.json({ error: "File wajib diisi" }, { status: 400 });
|
||||
|
||||
Reference in New Issue
Block a user