diff options
author | William Carroll <wpcarro@gmail.com> | 2020-02-07T21·30+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-02-07T21·30+0000 |
commit | 4f63b99cee4af6b5ba55dd2b821876c71dc7cf7d (patch) | |
tree | 9fabcb1339dd5f0440e37276b899621eb69b7984 | |
parent | 938c1a4eb06a37cb0eec7e31b392bb0c3a843d4b (diff) |
Support YNAB personal-access-token
Define my YNAB personal access token as an environment variable. Prefix Monzo environment variables with "monzo_" to more easily differentiate between Monzo credentials and YNAB credentials.
-rw-r--r-- | monzo_ynab/.envrc | 5 | ||||
-rw-r--r-- | monzo_ynab/main.go | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/monzo_ynab/.envrc b/monzo_ynab/.envrc index 121cc134de18..322e99ad6b35 100644 --- a/monzo_ynab/.envrc +++ b/monzo_ynab/.envrc @@ -5,6 +5,7 @@ # definitions inside of the attribute set passed to pkgs.mkShell become # available here as well. source_up -export client_id="$(pass show finance/monzo/client-id)" -export client_secret="$(pass show finance/monzo/client-secret)" +export monzo_client_id="$(pass show finance/monzo/client-id)" +export monzo_client_secret="$(pass show finance/monzo/client-secret)" +export ynab_personal_access_token="$(pass show finance/youneedabudget.com/personal-access-token)" eval "$(lorri direnv)" diff --git a/monzo_ynab/main.go b/monzo_ynab/main.go index 5b6c654e2832..07f3af9a1c81 100644 --- a/monzo_ynab/main.go +++ b/monzo_ynab/main.go @@ -24,8 +24,8 @@ import ( //////////////////////////////////////////////////////////////////////////////// var ( - clientId = os.Getenv("client_id") - clientSecret = os.Getenv("client_secret") + clientId = os.Getenv("monzo_client_id") + clientSecret = os.Getenv("monzo_client_secret") ) const ( |