Test server
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user