# Voting
## feat - Voting user - Halaman kontribusi - Halaman riwayat ### No issuue
This commit is contained in:
46
src/app_modules/vote/fun/create/create_hasil.ts
Normal file
46
src/app_modules/vote/fun/create/create_hasil.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function Vote_funCreateHasil(
|
||||
pilihanVotingId: string,
|
||||
votingId: string
|
||||
) {
|
||||
const authorId = await User_getUserId();
|
||||
|
||||
const get = await prisma.voting_DaftarNamaVote.findFirst({
|
||||
where: {
|
||||
id: pilihanVotingId,
|
||||
},
|
||||
select: {
|
||||
jumlah: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!get) return { status: 400, message: "Gagal Voting" };
|
||||
|
||||
const updt = await prisma.voting_DaftarNamaVote.update({
|
||||
where: {
|
||||
id: pilihanVotingId,
|
||||
},
|
||||
data: {
|
||||
jumlah: get.jumlah + 1,
|
||||
},
|
||||
});
|
||||
if (!updt) return { status: 400, message: "Gagal Update" };
|
||||
|
||||
const create = await prisma.voting_Kontributor.create({
|
||||
data: {
|
||||
voting_DaftarNamaVoteId: pilihanVotingId,
|
||||
votingId: votingId,
|
||||
authorId: authorId,
|
||||
},
|
||||
});
|
||||
if (!create) return { status: 400, message: "Gagal Menjadi Kontributor" };
|
||||
|
||||
|
||||
revalidatePath("/dev/vote/detail/main/");
|
||||
return { status: 201, message: "Berhasil Voting" };
|
||||
}
|
||||
24
src/app_modules/vote/fun/create/create_pilihan_voting.ts
Normal file
24
src/app_modules/vote/fun/create/create_pilihan_voting.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function Vote_funCreatePilihanVotingById(
|
||||
namaVotingId: string,
|
||||
votingId: string
|
||||
) {
|
||||
const authorId = await User_getUserId();
|
||||
|
||||
const create = await prisma.voting_Kontributor.create({
|
||||
data: {
|
||||
voting_DaftarNamaVoteId: namaVotingId,
|
||||
votingId: votingId,
|
||||
authorId: authorId,
|
||||
},
|
||||
});
|
||||
|
||||
if(!create) return {status: 400, message: "Gagal Voting"}
|
||||
revalidatePath("/dev/vote/detail/main/");
|
||||
return {status: 201, message: "Berhasil Voting"}
|
||||
}
|
||||
41
src/app_modules/vote/fun/create/create_vote.ts
Normal file
41
src/app_modules/vote/fun/create/create_vote.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
"use server";
|
||||
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { MODEL_VOTING } from "../../model/interface";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function Vote_funCreate(req: MODEL_VOTING, listVote: any[]) {
|
||||
const authorId = await User_getUserId();
|
||||
|
||||
const create = await prisma.voting.create({
|
||||
data: {
|
||||
title: req.title,
|
||||
deskripsi: req.deskripsi,
|
||||
awalVote: req.awalVote,
|
||||
akhirVote: req.akhirVote,
|
||||
authorId: authorId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!create) return { status: 400, message: "Gagal Membuat Vote" };
|
||||
|
||||
for (let v of listVote) {
|
||||
const val = v.value;
|
||||
|
||||
const namaVote = await prisma.voting_DaftarNamaVote.createMany({
|
||||
data: {
|
||||
value: val,
|
||||
votingId: create.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (!namaVote) return { status: 400, message: "Gagal Membuat List" };
|
||||
}
|
||||
revalidatePath("/dev/vote/main/status");
|
||||
|
||||
return {
|
||||
status: 201,
|
||||
message: "Berhasil Membuat Vote",
|
||||
};
|
||||
}
|
||||
26
src/app_modules/vote/fun/delete/fun_delete_by_id.ts
Normal file
26
src/app_modules/vote/fun/delete/fun_delete_by_id.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
/**
|
||||
* @param voteId
|
||||
* @returns isActive berubah menjadi false
|
||||
*/
|
||||
export async function Vote_funDeleteById(voteId: string) {
|
||||
const del = await prisma.voting.update({
|
||||
where: {
|
||||
id: voteId,
|
||||
},
|
||||
data: {
|
||||
isActive: false,
|
||||
},
|
||||
});
|
||||
|
||||
if (!del) return { status: 400, message: "Gagal Hapus Data" };
|
||||
revalidatePath("/dev/vote/main/status");
|
||||
return {
|
||||
status: 200,
|
||||
message: "Hapus Berhasil",
|
||||
};
|
||||
}
|
||||
48
src/app_modules/vote/fun/edit/fun_edit_by_id.ts
Normal file
48
src/app_modules/vote/fun/edit/fun_edit_by_id.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import {
|
||||
MODEL_VOTING,
|
||||
MODEL_VOTING_DAFTAR_NAMA_VOTE,
|
||||
} from "../../model/interface";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function Vote_funEditById(
|
||||
data: MODEL_VOTING,
|
||||
listVoting: MODEL_VOTING_DAFTAR_NAMA_VOTE[]
|
||||
) {
|
||||
// console.log(listVoting)
|
||||
const updtVoting = await prisma.voting.update({
|
||||
where: {
|
||||
id: data.id,
|
||||
},
|
||||
data: {
|
||||
title: data.title,
|
||||
deskripsi: data.deskripsi,
|
||||
awalVote: data.awalVote,
|
||||
akhirVote: data.akhirVote,
|
||||
},
|
||||
});
|
||||
|
||||
if (!updtVoting) return { status: 400, message: "Gagal Update" };
|
||||
|
||||
for (let e of listVoting) {
|
||||
const updtListVoting = await prisma.voting_DaftarNamaVote.updateMany({
|
||||
where: {
|
||||
id: e.id,
|
||||
},
|
||||
data: {
|
||||
value: e.value,
|
||||
},
|
||||
});
|
||||
|
||||
if (!updtListVoting)
|
||||
return { status: 400, message: "Gagal Update Daftar Vote" };
|
||||
}
|
||||
|
||||
revalidatePath("/dev/vote/detail/draft");
|
||||
return {
|
||||
status: 200,
|
||||
message: "Berhasil Update",
|
||||
};
|
||||
}
|
||||
26
src/app_modules/vote/fun/edit/fun_edit_status_by_id.ts
Normal file
26
src/app_modules/vote/fun/edit/fun_edit_status_by_id.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { revalidatePath } from "next/cache";
|
||||
|
||||
export async function Vote_funEditStatusByStatusId(
|
||||
voteId: string,
|
||||
statusId: string
|
||||
) {
|
||||
const updt = await prisma.voting.update({
|
||||
where: {
|
||||
id: voteId,
|
||||
},
|
||||
data: {
|
||||
voting_StatusId: statusId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!updt) return { status: 400, message: "Gagal Update" };
|
||||
revalidatePath("/dev/vote/main/status");
|
||||
return {
|
||||
status: 200,
|
||||
message: "Update Berhasil",
|
||||
};
|
||||
}
|
||||
21
src/app_modules/vote/fun/get/cek_kontributor_by_id.ts
Normal file
21
src/app_modules/vote/fun/get/cek_kontributor_by_id.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export async function Vote_cekKontributorById(votingId: string) {
|
||||
const UserId = await User_getUserId()
|
||||
|
||||
const cek = await prisma.voting_Kontributor.count({
|
||||
where: {
|
||||
authorId: UserId,
|
||||
votingId: votingId,
|
||||
},
|
||||
});
|
||||
|
||||
if (cek > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
47
src/app_modules/vote/fun/get/get_all_list_publish.ts
Normal file
47
src/app_modules/vote/fun/get/get_all_list_publish.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export async function Vote_getAllListPublish() {
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "1",
|
||||
isActive: true,
|
||||
akhirVote: {
|
||||
gte: new Date(),
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
deskripsi: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
voting_StatusId: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
},
|
||||
Author: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
nomor: true,
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
46
src/app_modules/vote/fun/get/get_all_list_riwayat.ts
Normal file
46
src/app_modules/vote/fun/get/get_all_list_riwayat.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
"use server"
|
||||
|
||||
import prisma from "@/app/lib/prisma"
|
||||
|
||||
export async function Vote_getAllListRiwayat() {
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "1",
|
||||
isActive: true,
|
||||
akhirVote: {
|
||||
lte: new Date(),
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
deskripsi: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
voting_StatusId: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
},
|
||||
Author: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
nomor: true,
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return data
|
||||
}
|
||||
49
src/app_modules/vote/fun/get/get_all_list_riwayat_saya.ts
Normal file
49
src/app_modules/vote/fun/get/get_all_list_riwayat_saya.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
"use server";
|
||||
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function Vote_getAllListRiwayatSaya() {
|
||||
const authorId = await User_getUserId();
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "1",
|
||||
authorId: authorId,
|
||||
isActive: true,
|
||||
akhirVote: {
|
||||
lte: new Date(),
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
deskripsi: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
voting_StatusId: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
},
|
||||
Author: {
|
||||
select: {
|
||||
id: true,
|
||||
username: true,
|
||||
nomor: true,
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
13
src/app_modules/vote/fun/get/get_list_daftar_vote_by_id.ts
Normal file
13
src/app_modules/vote/fun/get/get_list_daftar_vote_by_id.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function Vote_getListDaftarNamaById(voteId: string) {
|
||||
const data = await prisma.voting_DaftarNamaVote.findMany({
|
||||
where: {
|
||||
votingId: voteId,
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
42
src/app_modules/vote/fun/get/get_list_hasil_by_id.ts
Normal file
42
src/app_modules/vote/fun/get/get_list_hasil_by_id.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { MODEL_VOTING_DAFTAR_NAMA_VOTE } from "../../model/interface";
|
||||
import _ from "lodash";
|
||||
|
||||
export async function Vote_getHasilVoteById(
|
||||
daftarPilihanVoting: MODEL_VOTING_DAFTAR_NAMA_VOTE[]
|
||||
) {
|
||||
// console.log(daftarPilihanVoting)
|
||||
|
||||
// for (let e of daftarPilihanVoting) {
|
||||
// const get = await prisma.voting_Kontributor.count({
|
||||
// where: {
|
||||
// voting_DaftarNamaVoteId: e.id,
|
||||
// },
|
||||
// });
|
||||
|
||||
// console.log(get);
|
||||
// return get
|
||||
// }
|
||||
|
||||
const data = await prisma.voting_Kontributor.findMany({
|
||||
where: {
|
||||
votingId: "clsijw6uf0001x5logh7msuh1",
|
||||
},
|
||||
});
|
||||
|
||||
const hitung = _.map(
|
||||
_.groupBy(data, "voting_DaftarNamaVoteId"),
|
||||
(v: any) => ({
|
||||
jumlah: v.length,
|
||||
idDaftarNama: v[0].voting_DaftarNamaVoteId,
|
||||
})
|
||||
);
|
||||
|
||||
// const filter = hitung.filter(
|
||||
// (i: any) => i.idDaftarNama == "clsijw6ur0002x5loqsq6g4id"
|
||||
// );
|
||||
|
||||
return hitung
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export async function Vote_getAllListKontribusiByAuthorId() {
|
||||
const authorId = await User_getUserId();
|
||||
const data = await prisma.voting_Kontributor.findMany({
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
where: {
|
||||
authorId: authorId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
Voting: {
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
},
|
||||
Author: {
|
||||
select: {
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Voting_DaftarNamaVote: true,
|
||||
Author: true,
|
||||
},
|
||||
});
|
||||
return data;
|
||||
}
|
||||
26
src/app_modules/vote/fun/get/get_list_kontributor_by_id.ts
Normal file
26
src/app_modules/vote/fun/get/get_list_kontributor_by_id.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function Vote_getListKontributorById(votingId: string) {
|
||||
const data = await prisma.voting_Kontributor.findMany({
|
||||
where: {
|
||||
votingId: votingId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
Author: {
|
||||
select: {
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
Voting_DaftarNamaVote: {
|
||||
select: {
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
89
src/app_modules/vote/fun/get/get_list_status_by_status_id.ts
Normal file
89
src/app_modules/vote/fun/get/get_list_status_by_status_id.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export async function Vote_getListByStatusId(statusId: string) {
|
||||
const authorId = await User_getUserId();
|
||||
|
||||
if (statusId === "1") {
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "1",
|
||||
authorId: authorId,
|
||||
isActive: true,
|
||||
akhirVote: {
|
||||
gte: new Date(),
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
deskripsi: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
voting_StatusId: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
if (statusId === "2") {
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "2",
|
||||
authorId: authorId,
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
if (statusId === "3") {
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "3",
|
||||
authorId: authorId,
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
if (statusId === "4") {
|
||||
const data = await prisma.voting.findMany({
|
||||
orderBy: {
|
||||
updatedAt: "desc",
|
||||
},
|
||||
where: {
|
||||
voting_StatusId: "4",
|
||||
authorId: authorId,
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
37
src/app_modules/vote/fun/get/get_one_by_id.ts
Normal file
37
src/app_modules/vote/fun/get/get_one_by_id.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function Vote_getOnebyId(voteId: string) {
|
||||
const data = await prisma.voting.findFirst({
|
||||
where: {
|
||||
id: voteId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
deskripsi: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
voting_StatusId: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc"
|
||||
}
|
||||
},
|
||||
Author: {
|
||||
select: {
|
||||
Profile: true
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export async function Vote_getOnePilihanVotingByUserId(votingId: string) {
|
||||
const userId = await User_getUserId();
|
||||
const get = await prisma.voting_Kontributor.findFirst({
|
||||
where: {
|
||||
authorId: userId,
|
||||
votingId: votingId,
|
||||
},
|
||||
select: {
|
||||
Voting_DaftarNamaVote: {
|
||||
select: {
|
||||
value: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return get;
|
||||
}
|
||||
36
src/app_modules/vote/fun/get/get_one_publish_by_id.ts
Normal file
36
src/app_modules/vote/fun/get/get_one_publish_by_id.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function Vote_getOnePublishbyId(voteId: string) {
|
||||
const data = await prisma.voting.findFirst({
|
||||
where: {
|
||||
id: voteId,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
isActive: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
deskripsi: true,
|
||||
awalVote: true,
|
||||
akhirVote: true,
|
||||
catatan: true,
|
||||
authorId: true,
|
||||
voting_StatusId: true,
|
||||
Voting_DaftarNamaVote: {
|
||||
orderBy: {
|
||||
createdAt: "asc",
|
||||
},
|
||||
},
|
||||
Author: {
|
||||
select: {
|
||||
Profile: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user