From 2a174d06491eb0a5368a9c12d5bbd241a54c0b7a Mon Sep 17 00:00:00 2001 From: Angel Penchev Date: Tue, 9 Feb 2021 00:19:21 +0200 Subject: [PATCH] [Fix] Auth verify SMS controller parameters Fixed an issue with incorrect passing of request parameters to usecase. References #61. --- .../controllers/post-authenticate-verify-sms-token.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/services/user-service/src/interfaces/controllers/post-authenticate-verify-sms-token.ts b/server/services/user-service/src/interfaces/controllers/post-authenticate-verify-sms-token.ts index f80e1e8..4fe502f 100644 --- a/server/services/user-service/src/interfaces/controllers/post-authenticate-verify-sms-token.ts +++ b/server/services/user-service/src/interfaces/controllers/post-authenticate-verify-sms-token.ts @@ -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: {