From 1f857a7f85579d03bbca4b3b35e25373dc7f5646 Mon Sep 17 00:00:00 2001 From: Vladislav Hristov Date: Fri, 31 Aug 2018 10:23:41 +0300 Subject: [PATCH] Fix serialize method --- lib/BankLetter.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/BankLetter.js b/lib/BankLetter.js index d32c132..6910213 100644 --- a/lib/BankLetter.js +++ b/lib/BankLetter.js @@ -37,9 +37,11 @@ module.exports = class BankLetter { }) { this.client = client; this.bankName = bankName; - this.template = template; - } + if () + this.template = template; + + } async generate() { registerHelpers(); @@ -64,10 +66,11 @@ module.exports = class BankLetter { try { fs.writeFileSync(path, letter); - console.log("Data written to file"); + console.log('Data written to file'); } catch (error) { console.log(error); throw error; } + return new Promise(resolve => resolve(true)); } };