diff --git a/src/routes/access/login.ts b/src/routes/access/login.ts index e033c69..408efa3 100755 --- a/src/routes/access/login.ts +++ b/src/routes/access/login.ts @@ -30,7 +30,7 @@ router.post( await KeystoreRepo.create(user, accessTokenKey, refreshTokenKey); const tokens = await createTokens(user, accessTokenKey, refreshTokenKey); - const userData = await getUserData(user); + const userData = getUserData(user); new SuccessResponse('Login Success', { user: userData, diff --git a/src/routes/access/signup.ts b/src/routes/access/signup.ts index a863ecf..9652277 100644 --- a/src/routes/access/signup.ts +++ b/src/routes/access/signup.ts @@ -43,7 +43,7 @@ router.post( keystore.primaryKey, keystore.secondaryKey, ); - const userData = await getUserData(createdUser); + const userData = getUserData(createdUser); new SuccessResponse('Signup Successful', { user: userData, diff --git a/src/routes/access/utils.ts b/src/routes/access/utils.ts index c65539f..73fc357 100644 --- a/src/routes/access/utils.ts +++ b/src/routes/access/utils.ts @@ -6,7 +6,7 @@ export const enum AccessMode { SIGNUP = 'SIGNUP', } -export async function getUserData(user: User) { +export function getUserData(user: User) { const data = _.pick(user, ['_id', 'name', 'roles', 'profilePicUrl']); return data; }