feat: max price per series (#451)

This commit is contained in:
jastheace
2020-10-06 21:51:32 -04:00
committed by GitHub
parent 160ae37d7b
commit 8adc07a03e
5 changed files with 34 additions and 7 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, color?: boolean): string {
maxPrice(link: Link, store: Store, price: number, setPrice: number, color?: boolean): string {
if (color) {
return '✖ ' + buildProductString(link, store, true) + ' :: ' + chalk.yellow(`PRICE ${price} EXCEEDS LIMIT ${config.store.maxPrice}`);
return '✖ ' + buildProductString(link, store, true) + ' :: ' + chalk.yellow(`PRICE ${price} EXCEEDS LIMIT ${setPrice}`);
}
return `${buildProductString(link, store)} :: PRICE ${price} EXCEEDS LIMIT ${config.store.maxPrice}`;
return `${buildProductString(link, store)} :: PRICE ${price} EXCEEDS LIMIT ${setPrice}`;
},
message(message: string, topic: string, store: Store, color?: boolean): string {
if (color) {