add strike system (#18)
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m25s
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m25s
This commit is contained in:
@ -3,6 +3,7 @@ import { redirect } from '@sveltejs/kit';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { getSession } from '$lib/server/session';
|
||||
import { Permissions } from '$lib/permissions';
|
||||
import { StrikeReason } from '$lib/server/database';
|
||||
|
||||
export const load: PageServerLoad = async ({ parent, cookies }) => {
|
||||
const { reportCount } = await parent();
|
||||
@ -12,6 +13,7 @@ export const load: PageServerLoad = async ({ parent, cookies }) => {
|
||||
|
||||
return {
|
||||
count: getSession(cookies, { permissions: [Permissions.UserRead] }) != null ? reportCount : 0,
|
||||
strike_reasons: JSON.parse(JSON.stringify(await StrikeReason.findAll())),
|
||||
self: self
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user