diff --git a/ExpressAPI/src/controllers/Session.ts b/ExpressAPI/src/controllers/Session.ts index 77549d8630df98d91b1d4b1e5ef5a7851f91621e..49e044eab67d18a2108e54ef54c1d4e59b6896bb 100644 --- a/ExpressAPI/src/controllers/Session.ts +++ b/ExpressAPI/src/controllers/Session.ts @@ -16,7 +16,6 @@ class Session { } set profile(newProfile: User) { - delete newProfile.password; this._profile = newProfile; } diff --git a/ExpressAPI/src/types/DatabaseTypes.ts b/ExpressAPI/src/types/DatabaseTypes.ts index 91b3389d79d81d26cbbb7c93c0e9511dcf3143e4..632b05be5eda9eebf30a8c392e5a4020292dd10d 100644 --- a/ExpressAPI/src/types/DatabaseTypes.ts +++ b/ExpressAPI/src/types/DatabaseTypes.ts @@ -26,8 +26,7 @@ const resultBase = Prisma.validator<Prisma.ResultDefaultArgs>()({ }); -export type User = Omit<Prisma.UserGetPayload<typeof userBase>, 'gitlabLastRefreshToken'> & { - gitlabLastRefreshToken?: string +export type User = Prisma.UserGetPayload<typeof userBase> & { isTeachingStaff: boolean isAdmin: boolean gitlabProfile: LazyVal<GitlabUser>