From 4867a6151f3557d40131845a8c5efd8bc42289fa Mon Sep 17 00:00:00 2001 From: srikaanthtb Date: Wed, 9 Feb 2022 14:16:26 +0000 Subject: [PATCH] code to prevent certain stocks being sold --- functions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index a47dabc..d07e8ee 100644 --- a/functions/index.js +++ b/functions/index.js @@ -68,7 +68,7 @@ exports.getRichQuick = functions const stocksToBuy = gptCompletion.data.choices[0].text.match(/\b[A-Z]+\b/g); console.log(`Thanks for the tips Jim! ${stocksToBuy}`); - if (!stocksToBuy) { + if (!stocksToBuy || stocksToBuy == 'AAPL' || stocksToBuy == 'AMD' || stocksToBuy == 'NVDA') { console.log('sitting this one out'); return null; }