🌟 Refactor
- Moved mappings into Sb1 impl - Moved Actual types to @common - Moved createDirIfMissing to respective functions - Refactored main into multiple functions - Moved create db into Sb1impl and close - Log requests on info
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import type { Interval, TransactionResponse } from "./types"
|
||||
import type { TransactionResponse } from "./types"
|
||||
import * as querystring from "node:querystring"
|
||||
import { toISODateString } from "@common/date"
|
||||
import logger from "@common/logger"
|
||||
import { baseUrl } from "./common"
|
||||
import type { Interval } from "@common/types.ts"
|
||||
|
||||
export async function list(
|
||||
accessToken: string,
|
||||
@ -18,7 +19,7 @@ export async function list(
|
||||
})
|
||||
|
||||
const url = `${baseUrl}/personal/banking/transactions?${queryString}`
|
||||
logger.debug(`Sending GET request to '${url}'`)
|
||||
logger.info(`GET '${url}'`)
|
||||
const response = await fetch(url, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
|
Reference in New Issue
Block a user