fix POJO required error
All checks were successful
delpoy / build-and-deploy (push) Successful in 41s

This commit is contained in:
bytedream 2023-11-19 15:18:46 +01:00
parent 5442d0b745
commit b862b7c24d

View File

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