From fc4339118487caa002705efde051e79d18daf9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Tue, 2 Apr 2024 09:22:26 +0200 Subject: [PATCH] chore: adapted IUser to our DB schema (#6627) ## About the changes Our schema allows us to have null username or email. With this change at least we'll get a compiler warning when using either of these properties ![Screenshot from 2024-03-20 12-20-45](https://github.com/Unleash/unleash/assets/455064/7e1b7846-43a4-4532-be39-5a7bbc14e9fc) --- src/lib/types/user.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/types/user.ts b/src/lib/types/user.ts index c7c9965b8a..e8ac49d2a2 100644 --- a/src/lib/types/user.ts +++ b/src/lib/types/user.ts @@ -18,16 +18,16 @@ export interface UserData { export interface IUser { id: number; - name: string; - username: string; - email: string; + name?: string; + username?: string; + email?: string; inviteLink?: string; seenAt?: Date; createdAt?: Date; permissions: string[]; loginAttempts?: number; isAPI: boolean; - imageUrl: string; + imageUrl?: string; accountType?: AccountType; }