Skip to content

Commit

Permalink
Sonar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmeet29 committed Jun 19, 2024
1 parent fc38bd8 commit 96700a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/handler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ async function createAttachment(
const response = await updateServerRequest(
documentCreateURL,
formData,
config,
attachments,
data.ID
config
);
return response;
}
Expand Down
1 change: 0 additions & 1 deletion lib/sdm.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,5 @@ module.exports = class SDMAttachmentsService extends (
entity,
this.deleteAttachmentsWithKeys.bind(this)
);
return;
}
};
4 changes: 2 additions & 2 deletions lib/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 96700a8

Please sign in to comment.