Skip to content

Commit

Permalink
Fix people
Browse files Browse the repository at this point in the history
  • Loading branch information
MangoSwirl committed Jan 7, 2024
1 parent e4dcb48 commit 8fa8863
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/lib/server/util/person/addPerson.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
8 changes: 8 additions & 0 deletions src/lib/util/person/role/prismaRoles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Role } from "@prisma/client";


export const prismaRoles: Record<string, Role> = {
"STUDENT": Role.STUDENT,
"MENTOR": Role.MENTOR,
"OTHER": Role.OTHER,
};
8 changes: 0 additions & 8 deletions src/lib/util/person/role/roles.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import { Role } from "@prisma/client";

export const roles = [
"STUDENT",
"MENTOR",
"OTHER",
]

export const prismaRoles: Record<string, Role> = {
"STUDENT": Role.STUDENT,
"MENTOR": Role.MENTOR,
"OTHER": Role.OTHER,
}

export type RoleString = typeof roles[number];

0 comments on commit 8fa8863

Please sign in to comment.