Fix: User search & Event
Deskripsi: - Tampilan avatar dan username ## NO Issue
This commit is contained in:
@@ -6,13 +6,13 @@ import _ from "lodash";
|
||||
export async function event_getListAllPublish({ page }: { page: number }) {
|
||||
const takeData = 10;
|
||||
const skipData = page * takeData - takeData;
|
||||
|
||||
|
||||
const data = await prisma.event.findMany({
|
||||
take: takeData,
|
||||
skip: skipData,
|
||||
orderBy: [
|
||||
{
|
||||
tanggal: "desc",
|
||||
tanggal: "asc",
|
||||
},
|
||||
],
|
||||
where: {
|
||||
@@ -22,17 +22,9 @@ export async function event_getListAllPublish({ page }: { page: number }) {
|
||||
gte: new Date(),
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
lokasi: true,
|
||||
tanggal: true,
|
||||
deskripsi: true,
|
||||
active: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
include: {
|
||||
Author: {
|
||||
select: {
|
||||
include: {
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function Event_getOneById(eventId: string) {
|
||||
export async function event_getOneById(eventId: string) {
|
||||
const data = await prisma.event.findFirst({
|
||||
where: {
|
||||
id: eventId,
|
||||
@@ -19,7 +19,7 @@ export async function Event_getOneById(eventId: string) {
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
Author: {
|
||||
select: {
|
||||
include: {
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user