Skip to content

Commit

Permalink
feat: update according to code review x2
Browse files Browse the repository at this point in the history
  • Loading branch information
alinarublea committed Oct 20, 2023
1 parent 221dfe4 commit 912dd28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ export default class DB {
},
],
};
this.logger('info', `Audit for domain ${site.domain} saved successfully at ${now}`);
await this.saveRecord(newAudit, TABLE_AUDITS);
this.logger.info(`Audit for domain ${site.domain} saved successfully at ${now}`);
return Promise.resolve(newAudit);
}

Expand Down Expand Up @@ -123,14 +123,14 @@ export default class DB {
const response = await this.client.send(command);
const item = response.Item;
if (item) {
this.logger('info', `Item retrieved successfully: ${item}`);
this.logger.info(`Item retrieved successfully: ${item}`);
return item;
} else {
this.logger('info', 'Item not found.');
this.logger.info('Item not found.');
return null;
}
} catch (error) {
this.logger('error', `Error ${error}`);
this.logger.error(`Error ${error}`);
throw error;
}
}
Expand Down

0 comments on commit 912dd28

Please sign in to comment.