File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,7 +285,7 @@ END_DATE=$(date -d "-1 day $(date +%Y-%m-01)" +%Y-%m-%d)
285285
286286# For macOS (BSD date), use:
287287# START_DATE=$(date -v-1m +%Y-%m-01)
288- # END_DATE=$(date -v-1d -v1d +%Y-%m-%d)
288+ # END_DATE=$(date -v1d -v-1m -v-1d +%Y-%m-%d)
289289# Or install GNU coreutils (brew install coreutils) and use 'gdate'
290290
291291# Fetch transactions
Original file line number Diff line number Diff line change @@ -286,11 +286,17 @@ for (const account of accounts) {
286286import { PinTanClient } from " fints-lib" ;
287287
288288// Create client using environment variables for credentials
289+ // Ensure environment variables are set before running
290+ if (! process .env .FINTS_URL || ! process .env .FINTS_USERNAME ||
291+ ! process .env .FINTS_PIN || ! process .env .FINTS_BLZ ) {
292+ throw new Error (" Required environment variables are not set" );
293+ }
294+
289295const client = new PinTanClient ({
290- url: process .env .FINTS_URL ! ,
291- name: process .env .FINTS_USERNAME ! ,
292- pin: process .env .FINTS_PIN ! ,
293- blz: process .env .FINTS_BLZ ! ,
296+ url: process .env .FINTS_URL ,
297+ name: process .env .FINTS_USERNAME ,
298+ pin: process .env .FINTS_PIN ,
299+ blz: process .env .FINTS_BLZ ,
294300 debug: process .env .NODE_ENV === " development" ,
295301});
296302
You can’t perform that action at this time.
0 commit comments