Skip to content

Commit

Permalink
More cleanup of null checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwhelchel committed Jan 19, 2024
1 parent 95feb25 commit 1ab4c02
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/app-simplefin/app-simplefin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ app.post('/status', async (req, res) => {
app.post('/accounts', async (req, res) => {
let accessKey = secretsService.get(SecretName.simplefin_accessKey);

if (
accessKey === null ||
accessKey === undefined ||
accessKey === 'Forbidden'
) {
if (accessKey == null || accessKey === 'Forbidden') {
let token = secretsService.get(SecretName.simplefin_token);
if (token == || token === 'Forbidden') {
if (token == null || token === 'Forbidden') {
return;
} else {
accessKey = await getAccessKey(token);
Expand All @@ -59,11 +55,7 @@ app.post('/transactions', async (req, res) => {

let accessKey = secretsService.get(SecretName.simplefin_accessKey);

if (
accessKey === null ||
accessKey === undefined ||
accessKey === 'Forbidden'
) {
if (accessKey == null || accessKey === 'Forbidden') {
return;
}

Expand Down

0 comments on commit 1ab4c02

Please sign in to comment.