Test server

This commit is contained in:
2024-09-17 08:51:27 +08:00
parent 2fef481e2f
commit 2ccbca6566
21 changed files with 51 additions and 137 deletions

View File

@@ -8,12 +8,14 @@ import { revalidatePath } from "next/cache";
import { RouterInvestasi_OLD } from "@/app/lib/router_hipmi/router_investasi";
import { MODEL_INVESTASI } from "../_lib/interface";
import funUploadProspektusInvestasi from "./fun_upload_prospek";
import { user_funGetOneUserId } from "@/app_modules/fun_global";
export async function funCreateInvestasi(
fileGambar: FormData,
filePdf: FormData,
data: MODEL_INVESTASI
) {
const authorId = await user_funGetOneUserId();
// Function upload gambar
const gambar: any = fileGambar.get("file");
const gambarName = gambar.name;
@@ -42,7 +44,7 @@ export async function funCreateInvestasi(
const createInvest = await prisma.investasi.create({
data: {
authorId: data.authorId,
authorId: authorId,
title: _.startCase(data.title),
targetDana: data.targetDana.toString(),
hargaLembar: data.hargaLembar.toString(),