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:
saptarshi-bose authored and GitHub committed 2026-02-11 12:49:44 +00:00
1 parent b75000ea7b
commit f6fa24de2b
1 file changed
+1 -1
+1 -1
View File
@@ -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: {