Progres dan Bursa Investasi
# fix: - Bar progres berfungsi - Urutan bursa investasi # No issue
This commit is contained in:
@@ -20,7 +20,7 @@ export async function POST(req: Request) {
|
||||
} else {
|
||||
try {
|
||||
await fetch(
|
||||
`https://wa.wibudev.com/code?nom=${body.nomor}&text=${body.otp}`
|
||||
`https://wa.wibudev.com/code?nom=${body.nomor}&text=Masukan Kode OTP:${body.otp}`
|
||||
);
|
||||
return NextResponse.json({
|
||||
body,
|
||||
|
||||
@@ -6,6 +6,7 @@ export async function GET(
|
||||
req: NextRequest,
|
||||
{ params }: { params: { id: string } }
|
||||
) {
|
||||
|
||||
const data = await prisma.images.findUnique({
|
||||
where: {
|
||||
id: params.id,
|
||||
|
||||
9
src/app/api/investasi/midtrans/[id]/route.ts
Normal file
9
src/app/api/investasi/midtrans/[id]/route.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: NextRequest, {params}: {params: {id: any}}) {
|
||||
|
||||
const body = await req.json()
|
||||
console.log(body)
|
||||
|
||||
return NextResponse.json({ status: 200, message: "OK", data: body });
|
||||
}
|
||||
@@ -6,7 +6,7 @@ export async function GET(
|
||||
req: NextRequest,
|
||||
{ params }: { params: { id: string } }
|
||||
) {
|
||||
console.log(params.id)
|
||||
// console.log(params.id)
|
||||
const data = await prisma.prospektusInvestasi.findUnique({
|
||||
where: { id: params.id },
|
||||
select: {
|
||||
|
||||
@@ -8,6 +8,8 @@ import pembagianDeviden from "./../../../bin/seeder/investasi/pembagian_deviden.
|
||||
import statusInvestasi from "./../../../bin/seeder/investasi/status_investasi.json";
|
||||
import namaBank from "./../../../bin/seeder/investasi/nama_bank.json";
|
||||
import statusTransaksiInvestasi from "./../../../bin/seeder/investasi/status_transaksi_investasi.json";
|
||||
import jenisProgres from "../../../bin/seeder/investasi/master_progres.json";
|
||||
import userSeeder from "../../../bin/seeder/user_seeder.json";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const dev = new URL(req.url).searchParams.get("dev");
|
||||
@@ -28,6 +30,24 @@ export async function GET(req: Request) {
|
||||
});
|
||||
}
|
||||
|
||||
for (let i of userSeeder) {
|
||||
await prisma.user.upsert({
|
||||
where: {
|
||||
nomor: i.nomor,
|
||||
},
|
||||
create: {
|
||||
nomor: i.nomor,
|
||||
username: i.name,
|
||||
masterUserRoleId: i.masterUserRoleId,
|
||||
},
|
||||
update: {
|
||||
nomor: i.nomor,
|
||||
username: i.name,
|
||||
masterUserRoleId: i.masterUserRoleId,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
for (let i of bidangBisnis) {
|
||||
await prisma.masterBidangBisnis.upsert({
|
||||
where: {
|
||||
@@ -146,6 +166,21 @@ export async function GET(req: Request) {
|
||||
});
|
||||
}
|
||||
|
||||
for (let i of jenisProgres) {
|
||||
await prisma.masterProgresInvestasi.upsert({
|
||||
where: {
|
||||
id: i.id,
|
||||
},
|
||||
create: {
|
||||
id: i.id,
|
||||
name: i.name,
|
||||
},
|
||||
update: {
|
||||
name: i.name,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return NextResponse.json({ success: true });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user