From e936c4d3120503fb6b081422b3f1e572a1fd4ffa Mon Sep 17 00:00:00 2001 From: Mohammed Ashab Uddin Date: Thu, 30 Jul 2020 09:29:19 +0400 Subject: [PATCH] added selection methods --- whatsapp-web.js/src/models/user.js | 9 +++++++++ whatsapp-web.js/src/models/website.js | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/whatsapp-web.js/src/models/user.js b/whatsapp-web.js/src/models/user.js index 2c915c6..0bac638 100644 --- a/whatsapp-web.js/src/models/user.js +++ b/whatsapp-web.js/src/models/user.js @@ -29,6 +29,15 @@ class User{ return this.websites.getData(companyName); } + selectWebsite(companyName) + { + return this.websites.selectData(companyName); + } + + getSelectedWebsite(){ + return this.websites.selectedData; + } + } module.exports.User = User; \ No newline at end of file diff --git a/whatsapp-web.js/src/models/website.js b/whatsapp-web.js/src/models/website.js index 86e0f35..5e3198b 100644 --- a/whatsapp-web.js/src/models/website.js +++ b/whatsapp-web.js/src/models/website.js @@ -54,6 +54,15 @@ class Website { return this.products.deleteData(productId); } + selectProduct(productId){ + return this.products.selectData(productId); + } + + getSelectedProduct() + { + return this.products.selectedData; + } + }