adjusted zoho Token expiry time to miliseconds. (#27855)
The Date.now() method returns time in epoch miliseconds, adding 60 * 60 = 3.6seconds leads to a bug that results in expiring the access token in 3.6 seconds, although it been valid. It creates unnecessary api calls to the zoho servers before most the api calls.
This commit is contained in:
@@ -236,7 +236,7 @@ class ZohoCrmCrmService implements CRM {
|
||||
);
|
||||
if (!zohoCrmTokenInfo.data.error) {
|
||||
// set expiry date as offset from current time.
|
||||
zohoCrmTokenInfo.data.expiryDate = Math.round(Date.now() + 60 * 60);
|
||||
zohoCrmTokenInfo.data.expiryDate = Math.round(Date.now() + 60 * 60 * 1000);
|
||||
|
||||
await prisma.credential.update({
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user