From 98bb07e0fc59c58805713a9f9c28132d8af1e4cb Mon Sep 17 00:00:00 2001 From: SteffenGorenflo Date: Thu, 30 Jul 2015 17:39:01 +0100 Subject: [PATCH] remove callback function from utility method, #35 --- src/util/util.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/util/util.ts b/src/util/util.ts index 95a5079..807a03c 100644 --- a/src/util/util.ts +++ b/src/util/util.ts @@ -17,8 +17,7 @@ class Util { * @param element * @param callback */ - createDocument = (element, callback) => { - callback = callback || this.noop; + createDocument = (element) => { var date = new Date(); element.create_date = date.toISOString(); @@ -26,7 +25,6 @@ class Util { this.db.save(element, (err, data) => { - callback(err, data); if (err) { return reject(Boom.badRequest(err)); } @@ -453,9 +451,4 @@ class Util { }) }) }; - /** - * empty pseudo callback - */ - noop = () => { - }; } \ No newline at end of file