diff --git a/src/service/otp.service.ts b/src/service/otp.service.ts index dfc7473..67ec1cd 100644 --- a/src/service/otp.service.ts +++ b/src/service/otp.service.ts @@ -56,7 +56,8 @@ export class OtpService { // const response = await sendOTPSMS(phoneNumber, otpInfo.OTP); const response = otp; result.statusCode = 200; - result.message = response; + result.message = 'Request OTP successfully'; + result.data = response; return result; } catch (error) { result.statusCode = 500; @@ -95,7 +96,8 @@ export class OtpService { await this.tokenService.updateRefreshToken(user, tokenData.refresh_token); result.statusCode = 200; - result.message = tokenData; + result.message = 'Authenticate OTP successfully'; + result.data = tokenData; return result; } catch (error) { console.log(error); diff --git a/src/service/token.service.ts b/src/service/token.service.ts index 59c2424..3ff07f7 100644 --- a/src/service/token.service.ts +++ b/src/service/token.service.ts @@ -99,7 +99,8 @@ export class TokenService { this.updateRefreshToken(user, tokenData.refresh_token); result.statusCode = 200; - result.message = tokenData; + result.message = 'Refresh token successfully'; + result.data = tokenData; return result; } }