-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow multiple microcenter locations #487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks pretty good. Just a comment and question.
Thanks for doing this!
const logString = `No MicroCenter location named ${microCenterLocation}, skipping.`; | ||
logger.warn(logString); | ||
} else { | ||
storeId = microCenterLocationToId.get(microCenterLocation)!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the !
mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-null assertion. It was there before I moved this line, not sure if it's still needed.
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why type of rate limiting Microcenter has, but hopefully it doesn't have a low threshold 😅 This is quite a lot of extra links!
Thanks for doing this!
Description
Resolves #386
In some cases (e.g. Georgia) there are more than one MicroCenter locations nearby, so we'd want to check more than one location.
Testing
Set MICROCENTER_LOCATION variable to "duluth,marietta" and STORES to "microcenter". Verified in the debug logs that links from both locations were loaded into the Store object for MicroCenter. The bot then checked for cards from MicroCenter successfully.