mirror of
https://github.com/EdiFarcas/Giveaway-app.git
synced 2026-06-22 09:00:58 +03:00
13 lines
294 B
TypeScript
13 lines
294 B
TypeScript
import { db } from "@/lib/db";
|
|
|
|
async function entrycount(userId: string, giveawayId: string) {
|
|
const entryCount = await db.entry.count({
|
|
where: {
|
|
userId: userId,
|
|
giveawayId: giveawayId,
|
|
},
|
|
});
|
|
return entryCount;
|
|
}
|
|
|
|
export default entrycount; |