Penerapan UI Home
# style: - Tampilan home dan loading ## No issue
This commit is contained in:
28
src/app_modules/job/fun/get/get_two_for_home_view.ts
Normal file
28
src/app_modules/job/fun/get/get_two_for_home_view.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function job_getTwoForHomeView() {
|
||||
const get = await prisma.job.findMany({
|
||||
take: 2,
|
||||
orderBy: {
|
||||
createdAt: "desc",
|
||||
},
|
||||
where: {
|
||||
isActive: true,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
Author: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
},
|
||||
},
|
||||
title: true,
|
||||
deskripsi: true
|
||||
},
|
||||
});
|
||||
|
||||
return get;
|
||||
}
|
||||
Reference in New Issue
Block a user