From 912dd283b9100f8b8ced64c1983c7c188a0c4ba0 Mon Sep 17 00:00:00 2001 From: alinarublea Date: Fri, 20 Oct 2023 15:23:05 +0200 Subject: [PATCH] feat: update according to code review x2 --- src/db.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/db.js b/src/db.js index 36daf4a3..98bb5577 100644 --- a/src/db.js +++ b/src/db.js @@ -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); } @@ -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; } }