Skip to content

Commit

Permalink
Return created user without await
Browse files Browse the repository at this point in the history
  • Loading branch information
hagopj13 committed Jul 4, 2021
1 parent 1210cb5 commit dc5708e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/services/user.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ const createUser = async (userBody) => {
if (await User.isEmailTaken(userBody.email)) {
throw new ApiError(httpStatus.BAD_REQUEST, 'Email already taken');
}
const user = await User.create(userBody);
return user;
return User.create(userBody);
};

/**
Expand Down

0 comments on commit dc5708e

Please sign in to comment.