@@ -79,7 +79,7 @@ export class ApiController {
79
79
@Query ( ) params : SendOtpDto ,
80
80
@Headers ( 'x-application-id' ) applicationId ?,
81
81
) : Promise < any > {
82
- const startTime = Date . now ( ) ;
82
+ const startTime = ( ( performance . timeOrigin + performance . now ( ) ) * 1000 ) ;
83
83
84
84
let status : any ,
85
85
isWhatsApp = false ,
@@ -136,7 +136,7 @@ export class ApiController {
136
136
{
137
137
botId : params . botId ,
138
138
orgId : params . orgId ,
139
- timeTaken : Date . now ( ) - startTime ,
139
+ timeTaken : ( ( performance . timeOrigin + performance . now ( ) ) * 1000 ) - startTime ,
140
140
createdAt : Math . floor ( new Date ( ) . getTime ( ) / 1000 ) ,
141
141
phoneNumber : params . phone ,
142
142
eventLog : `Response from OTP provider - ${ status . providerSuccessResponse } ` ,
@@ -430,7 +430,7 @@ export class ApiController {
430
430
@Headers ( 'authorization' ) authHeader ,
431
431
@Headers ( 'ADMIN-API-KEY' ) adminApiKey ,
432
432
) : Promise < any > {
433
- const startTime = Date . now ( ) ;
433
+ const startTime = ( ( performance . timeOrigin + performance . now ( ) ) * 1000 ) ;
434
434
if ( adminApiKey != this . configService . get ( 'ADMIN_API_KEY' ) ) {
435
435
const response : SignupResponse = new SignupResponse ( ) . init ( uuidv4 ( ) ) ;
436
436
response . responseCode = ResponseCode . FAILURE ;
@@ -445,7 +445,7 @@ export class ApiController {
445
445
{
446
446
botId : user . botId ,
447
447
orgId : null ,
448
- timeTaken : Date . now ( ) - startTime ,
448
+ timeTaken : ( ( performance . timeOrigin + performance . now ( ) ) * 1000 ) - startTime ,
449
449
createdAt : Math . floor ( new Date ( ) . getTime ( ) / 1000 ) ,
450
450
userId : response . result . data . user . id ,
451
451
eventLog : `Status from Fusionauth - ${ response . responseCode } ` ,
0 commit comments