chore(misc): normalize logs (#242)

This commit is contained in:
Jef LeCompte
2020-09-23 14:20:06 -04:00
committed by GitHub
parent 8466f9f398
commit 7c50e2b5aa
21 changed files with 239 additions and 183 deletions
+7 -7
View File
@@ -1,14 +1,14 @@
import {Link} from '../store/model';
import {Link, Store} from '../store/model';
import {Logger, Print} from '../logger';
import notifier from 'node-notifier';
export function sendDesktopNotification(cartUrl: string, link: Link) {
export function sendDesktopNotification(link: Link, store: Store) {
(async () => {
const title = link.brand + ' ' + link.model + ' IN STOCK';
const message = cartUrl;
notifier.notify({
message,
title
message: link.cartUrl ? link.cartUrl : link.url,
title: Print.inStock(link, store)
});
Logger.info('✔ desktop notification sent');
})();
}