From 8fa88632effba410e0bfc5e70825de34dbb80813 Mon Sep 17 00:00:00 2001 From: MangoSwirl Date: Sun, 7 Jan 2024 14:47:37 -0800 Subject: [PATCH] Fix people --- src/lib/server/util/person/addPerson.ts | 3 ++- src/lib/util/person/role/prismaRoles.ts | 8 ++++++++ src/lib/util/person/role/roles.ts | 8 -------- 3 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 src/lib/util/person/role/prismaRoles.ts diff --git a/src/lib/server/util/person/addPerson.ts b/src/lib/server/util/person/addPerson.ts index 2f3b80a..09a36c0 100644 --- a/src/lib/server/util/person/addPerson.ts +++ b/src/lib/server/util/person/addPerson.ts @@ -1,4 +1,5 @@ -import { prismaRoles, type RoleString } from '$lib/util/person/role/roles'; +import type { RoleString } from "$lib/util/person/role/roles"; +import { prismaRoles } from "$lib/util/person/role/prismaRoles"; import { QuizType } from '@prisma/client'; import { defaultPermissions } from '../permission/defaultPermissions'; import prisma from '../prisma'; diff --git a/src/lib/util/person/role/prismaRoles.ts b/src/lib/util/person/role/prismaRoles.ts new file mode 100644 index 0000000..3691f40 --- /dev/null +++ b/src/lib/util/person/role/prismaRoles.ts @@ -0,0 +1,8 @@ +import { Role } from "@prisma/client"; + + +export const prismaRoles: Record = { + "STUDENT": Role.STUDENT, + "MENTOR": Role.MENTOR, + "OTHER": Role.OTHER, +}; diff --git a/src/lib/util/person/role/roles.ts b/src/lib/util/person/role/roles.ts index b0f2a3d..42cd116 100644 --- a/src/lib/util/person/role/roles.ts +++ b/src/lib/util/person/role/roles.ts @@ -1,15 +1,7 @@ -import { Role } from "@prisma/client"; - export const roles = [ "STUDENT", "MENTOR", "OTHER", ] -export const prismaRoles: Record = { - "STUDENT": Role.STUDENT, - "MENTOR": Role.MENTOR, - "OTHER": Role.OTHER, -} - export type RoleString = typeof roles[number];