From 89fa488b6d018831765ff7e339bb9a1a0ded1863 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Thu, 2 Nov 2023 13:10:45 +0100
Subject: [PATCH] DatabaseType => Remove refreshToken

---
 ExpressAPI/src/controllers/Session.ts | 1 -
 ExpressAPI/src/types/DatabaseTypes.ts | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/ExpressAPI/src/controllers/Session.ts b/ExpressAPI/src/controllers/Session.ts
index 77549d8..49e044e 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 91b3389..632b05b 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>
-- 
GitLab