fix (donasi)
deskripsi: - fix notifikasi to all user
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"use server";
|
||||
|
||||
import { prisma } from "@/app/lib";
|
||||
|
||||
export async function notifikasi_checkAuthorDonasiById({
|
||||
userId,
|
||||
donasiId,
|
||||
}: {
|
||||
userId: string;
|
||||
donasiId: string;
|
||||
}) {
|
||||
const check = await prisma.donasi.findFirst({
|
||||
where: {
|
||||
authorId: userId,
|
||||
id: donasiId,
|
||||
},
|
||||
});
|
||||
|
||||
if (check) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user