mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 08:12:40 +10:00
fix(prisma): update prisma schemas
This commit is contained in:
10
server/api/v1/admin/user/index.get.ts
Normal file
10
server/api/v1/admin/user/index.get.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import prisma from "~/server/internal/db/database";
|
||||
|
||||
export default defineEventHandler(async (h3) => {
|
||||
const user = await h3.context.session.getAdminUser(h3);
|
||||
if (!user) throw createError({ statusCode: 403 });
|
||||
|
||||
const users = await prisma.user.findMany({});
|
||||
|
||||
return users;
|
||||
});
|
||||
Reference in New Issue
Block a user