-
Notifications
You must be signed in to change notification settings - Fork 225
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
Large changes - updating pattern with a few new features #296
base: master
Are you sure you want to change the base?
Conversation
- update packages for client and server (still could be updated - but there would need to be code rewritten) - add a transactions table (the transactions table does not include pending currently) - changed the overall method of using ngrok to using a reverse proxy - added a cron job that refreshes the transactions daily (for whatever reason the webhook wasn't working on all institutions) - added a label function that adds in a user defined field to the database
(Belated) Thanks for submitting this, @jkoestner ! I'm not sure if we'll merge this entire PR all at once, but I think at the very least, we can start adding these features one at a time where they make sense. |
// If user has entered a webhook in the .env file | ||
if (PLAID_WEBHOOK_URL.indexOf('http') === 0) { | ||
linkTokenParams.webhook = PLAID_WEBHOOK_URL; | ||
} |
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.
I mentioned this to Todd over Slack, but it strikes me that if we want to support specifying a PLAID_WEBHOOK_URL we'd need to update .env.template to have instructions on doing this. I am a big fan of removing the ngrok dependency if possible, though, especially as ngrok just broke us again (this is at least the second time that a breaking change to ngrok has broken pattern).
@@ -63,6 +68,9 @@ const createOrUpdateTransactions = async transactions => { | |||
unofficial_currency_code = EXCLUDED.unofficial_currency_code, | |||
date = EXCLUDED.date, | |||
pending = EXCLUDED.pending, | |||
primary_category = EXCLUDED.primary_category, | |||
detailed_category = EXCLUDED.detailed_category, | |||
confidence_level = EXCLUDED.confidence_level, |
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.
database/init/create.sql should also be updated accordingly:
CREATE TABLE transactions_table
(
<...>
primary_category text,
detailed_category text,
confidence_level text,
<...>
Thank you! Got this tentatively working locally (without ngrok and docker). It seems to work fine with Node 20. |
To caveat - I'm not expecting this PR to be merged, but thought that it might help others if they were looking to do something similar.
I've been tinkering with the pattern template and really liked how it provided an initial framework with interacting with the tool. With that said it is a little outdated and worked through adding some additional functionality. The below lists describes the changes throughout the PR.