diff --git a/src/modules/auth/auth.types.ts b/src/modules/auth/auth.types.ts index 133434b..a88fcf3 100644 --- a/src/modules/auth/auth.types.ts +++ b/src/modules/auth/auth.types.ts @@ -48,7 +48,8 @@ export type LoginOutput = { email: string; isEmailVerified: boolean; id: string; - name: string; + firstName: string; + lastName: string; role: string; createdAt: string; updatedAt: string; @@ -65,7 +66,8 @@ export type GetMeOutput = { user: { id: string; email: string; - name: string; + firstName: string; + lastName: string; role: string; isEmailVerified: boolean; createdAt: Date; diff --git a/src/modules/user/user.utils.ts b/src/modules/user/user.utils.ts index 90a9f39..f513f46 100644 --- a/src/modules/user/user.utils.ts +++ b/src/modules/user/user.utils.ts @@ -9,11 +9,12 @@ export function serializeUser(user: IUser) { const safe = { id: obj._id?.toString(), email: obj.email, - name: obj.name, role: obj.role, isEmailVerified: obj.isEmailVerified, createdAt: obj.createdAt, updatedAt: obj.updatedAt, + firstName: obj.firstName, + lastName: obj.lastName, }; return safe;