chore: refactor max price for series

Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
Jef LeCompte
2020-10-06 22:03:19 -04:00
parent 8adc07a03e
commit 86bef5a617
6 changed files with 32 additions and 26 deletions
+3 -3
View File
@@ -78,12 +78,12 @@ export const Print = {
return ` ${buildProductString(link, store)} :: IN STOCK, WAITING`;
},
maxPrice(link: Link, store: Store, price: number, setPrice: number, color?: boolean): string {
maxPrice(link: Link, store: Store, price: number, maxPrice: number, color?: boolean): string {
if (color) {
return '✖ ' + buildProductString(link, store, true) + ' :: ' + chalk.yellow(`PRICE ${price} EXCEEDS LIMIT ${setPrice}`);
return '✖ ' + buildProductString(link, store, true) + ' :: ' + chalk.yellow(`PRICE ${price} EXCEEDS LIMIT ${maxPrice}`);
}
return `${buildProductString(link, store)} :: PRICE ${price} EXCEEDS LIMIT ${setPrice}`;
return `${buildProductString(link, store)} :: PRICE ${price} EXCEEDS LIMIT ${maxPrice}`;
},
message(message: string, topic: string, store: Store, color?: boolean): string {
if (color) {