Skip to content

Commit

Permalink
[Fix] Auth verify SMS controller parameters
Browse files Browse the repository at this point in the history
Fixed an issue with incorrect passing of request parameters to usecase.
References #61.
  • Loading branch information
angel-penchev committed Feb 8, 2021
1 parent b1e4126 commit 2a174d0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import {HttpRequest} from '../../../../core/@types/global';
* } - dependency injection
* @return {Function} - post users send sms token controller builder function
*/
export default function buildPostAuthenticateVerifyToken({
export default function buildPostAuthenticateVerifyCode({
verifyAuthenticationSmsCode,
}: {verifyAuthenticationSmsCode: Function}): Function {
return async function postAuthenticateVerifyToken(httpRequest: HttpRequest) {
return async function postAuthenticateVerifyCode(httpRequest: HttpRequest) {
try {
const verificationInfo = httpRequest.body;
const verificationInstance = await verifyAuthenticationSmsCode(
verificationInfo,
verificationInfo.phoneNumber,
verificationInfo.code,
);
return {
headers: {
Expand Down

0 comments on commit 2a174d0

Please sign in to comment.