From 96700a8f870870e44d1af647872338161172e9ce Mon Sep 17 00:00:00 2001 From: "Yashmeet ." Date: Wed, 19 Jun 2024 13:20:23 +0530 Subject: [PATCH] Sonar fixes --- lib/handler/index.js | 4 +--- lib/sdm.js | 1 - lib/util/index.js | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/handler/index.js b/lib/handler/index.js index 9ac1b2a..57c74a5 100644 --- a/lib/handler/index.js +++ b/lib/handler/index.js @@ -118,9 +118,7 @@ async function createAttachment( const response = await updateServerRequest( documentCreateURL, formData, - config, - attachments, - data.ID + config ); return response; } diff --git a/lib/sdm.js b/lib/sdm.js index 6b0ced7..91cb396 100644 --- a/lib/sdm.js +++ b/lib/sdm.js @@ -277,6 +277,5 @@ module.exports = class SDMAttachmentsService extends ( entity, this.deleteAttachmentsWithKeys.bind(this) ); - return; } }; diff --git a/lib/util/index.js b/lib/util/index.js index 76fa235..bfc521b 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -41,8 +41,8 @@ async function generateSDMBearerToken(credentials, jwt) { }); } function isTokenExpired(exp) { - var expiry = new Date(exp * 1000); - var now = new Date(); + const expiry = new Date(exp * 1000); + const now = new Date(); return now > expiry; } function decodeAccessToken(jwtEncoded) {