mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-26 09:44:40 +10:00
fix(prisma): update prisma schemas
This commit is contained in:
@@ -29,7 +29,9 @@ model Game {
|
|||||||
mImageLibrary String[] // linked to objects in s3
|
mImageLibrary String[] // linked to objects in s3
|
||||||
|
|
||||||
versions GameVersion[]
|
versions GameVersion[]
|
||||||
libraryBasePath String @unique // Base dir for all the game versions
|
libraryBasePath String @unique // Base dir for all the game versions
|
||||||
|
|
||||||
|
collections CollectionEntry[]
|
||||||
|
|
||||||
@@unique([metadataSource, metadataId], name: "metadataKey")
|
@@unique([metadataSource, metadataId], name: "metadataKey")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ model User {
|
|||||||
displayName String
|
displayName String
|
||||||
profilePicture String // Object
|
profilePicture String // Object
|
||||||
|
|
||||||
authMecs LinkedAuthMec[]
|
authMecs LinkedAuthMec[]
|
||||||
clients Client[]
|
clients Client[]
|
||||||
|
|
||||||
notifications Notification[]
|
notifications Notification[]
|
||||||
|
collections Collection[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model Notification {
|
model Notification {
|
||||||
@@ -21,7 +21,7 @@ model Notification {
|
|||||||
userId String
|
userId String
|
||||||
user User @relation(fields: [userId], references: [id])
|
user User @relation(fields: [userId], references: [id])
|
||||||
|
|
||||||
created DateTime @default(now())
|
created DateTime @default(now())
|
||||||
title String
|
title String
|
||||||
description String
|
description String
|
||||||
actions String[]
|
actions String[]
|
||||||
|
|||||||
@@ -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