add admin settings
All checks were successful
delpoy / build-and-deploy (push) Successful in 40s

This commit is contained in:
2023-11-30 19:15:00 +01:00
parent 44454f445f
commit 235dfe3094
12 changed files with 176 additions and 9 deletions

View File

@@ -16,6 +16,7 @@ export const load: LayoutServerLoad = async ({ route, cookies }) => {
? await Report.count({ where: { draft: false, status: ['none', 'review'] } })
: null,
adminCount: session?.permissions.adminRead() ? await Admin.count() : null,
settingsRead: session?.permissions.settingsRead(),
self: session
? JSON.parse(JSON.stringify(await Admin.findOne({ where: { id: session.userId } })))
: null