From 59c4b0de38db976551aef661e0919afee845ac1b Mon Sep 17 00:00:00 2001 From: takiguchi Date: Sun, 6 Sep 2020 19:37:38 +0200 Subject: [PATCH] Code cleaning. --- src/js/repository/mongoClient.js | 2 +- src/js/repository/repository.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/repository/mongoClient.js b/src/js/repository/mongoClient.js index c043964..cb20689 100644 --- a/src/js/repository/mongoClient.js +++ b/src/js/repository/mongoClient.js @@ -40,7 +40,7 @@ class MongoClient { } delete(collectionName, entityId, callback) { - this.db.collection(collectionName).deleteOne({_id: mongodb.ObjectId(entityId)}, (error, result) => { + this.db.collection(collectionName).deleteOne({_id: mongodb.ObjectId(entityId)}, (error) => { assert.equal(null, error, `Unable to delete ${collectionName} entity with id ${entityId}: ${error}.`); console.log(`Entity ${collectionName} with id ${entityId} deleted.`); callback(); diff --git a/src/js/repository/repository.js b/src/js/repository/repository.js index 275df5d..06e7320 100644 --- a/src/js/repository/repository.js +++ b/src/js/repository/repository.js @@ -21,6 +21,6 @@ class Repository { delete(entityId, callback) { this.mongoClient.delete(this.collectionName, entityId, callback); } -}; +} module.exports = Repository; \ No newline at end of file