Invesment

Add:
- src/app/api/mobile/investment/[id]/invoice/
- src/app/api/mobile/master/bank/

### No Issue
This commit is contained in:
2025-10-02 17:30:28 +08:00
parent a419f454fa
commit 4ab49854e7
2 changed files with 249 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { prisma } from "@/lib";
import { NextResponse } from "next/server";
export { GET };
async function GET() {
try {
const data = await prisma.masterBank.findMany({
orderBy: {
updatedAt: "asc",
},
where: {
isActive: true,
},
});
return NextResponse.json(
{ success: true, message: "Berhasil mendapatkan data", data: data },
{ status: 200 }
);
} catch (error) {
console.error("Error Get Master Bank >>", error);
return NextResponse.json(
{
success: false,
message: "API Error Get Data",
reason: (error as Error).message,
},
{ status: 500 }
);
} finally {
await prisma.$disconnect();
}
}