Test foto server
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"use server"
|
||||
|
||||
import prisma from "@/app/lib/prisma"
|
||||
|
||||
export async function investasi_funGetProspekById({prospekId}: {prospekId: string}) {
|
||||
const data = await prisma.prospektusInvestasi.findFirst({
|
||||
where: {
|
||||
id: prospekId
|
||||
}
|
||||
})
|
||||
|
||||
return data
|
||||
}
|
||||
27
src/app_modules/investasi/_fun/get/fun_get_one_by_id.ts
Normal file
27
src/app_modules/investasi/_fun/get/fun_get_one_by_id.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
"use server";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function investasi_funGetOneInvestasiById({investasiId}: {investasiId: string}) {
|
||||
const data = await prisma.investasi.findUnique({
|
||||
where: {
|
||||
id: investasiId,
|
||||
},
|
||||
include: {
|
||||
author: {
|
||||
include: {
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
MasterStatusInvestasi: true,
|
||||
BeritaInvestasi: true,
|
||||
DokumenInvestasi: true,
|
||||
ProspektusInvestasi: true,
|
||||
MasterPembagianDeviden: true,
|
||||
MasterPencarianInvestor: true,
|
||||
MasterPeriodeDeviden: true,
|
||||
MasterProgresInvestasi: true,
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
5
src/app_modules/investasi/_fun/index.ts
Normal file
5
src/app_modules/investasi/_fun/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { investasi_funGetProspekById } from "./get/fun_get_file_by_prospek_id";
|
||||
import { investasi_funGetOneInvestasiById } from "./get/fun_get_one_by_id";
|
||||
|
||||
export { investasi_funGetOneInvestasiById };
|
||||
export { investasi_funGetProspekById };
|
||||
Reference in New Issue
Block a user