Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect method call for getting user with email #9

Closed
Gambitier opened this issue Aug 7, 2021 · 1 comment
Closed

Incorrect method call for getting user with email #9

Gambitier opened this issue Aug 7, 2021 · 1 comment

Comments

@Gambitier
Copy link

Describe the bug
Incorrect method call for fetching user with email on line number 84

public generateOtp = async (otpDetails: any): Promise<boolean> => {
var person: PersonDetailsDto = null;
if (otpDetails.Phone) {
person = await this._personRepo.getPersonWithPhone(otpDetails.Phone);
if (person == null) {
let message = 'User does not exist with phone(' + otpDetails.Phone + ')';
throw new ApiError(404, message);
}
} else if (otpDetails.Email) {
person = await this._personRepo.getPersonWithPhone(otpDetails.Email);
if (person == null) {
let message = 'User does not exist with email(' + otpDetails.Email + ')';
throw new ApiError(404, message);
}
}

To Reproduce

  • N/A

Expected behavior
code should should be

person = await this._personRepo.getPersonWithEmail(otpDetails.Email);

Screenshots

  • N/A

Desktop (please complete the following information):

  • N/A

Smartphone (please complete the following information):

  • N/A

Additional context

  • N/A
@kiran-rean kiran-rean mentioned this issue Aug 17, 2021
13 tasks
@kiran-rean
Copy link
Contributor

Fixed. Thanks Akash for pointing this out.

kiran-rean pushed a commit that referenced this issue May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants