Fixes
- Added Actual account ids and log level to .env.example. - Fixed timestamp error by downloading the budget after init. - Hardcoded date in test. - Separate logging file for configurations. - Organized test - More logging in main - Fixed wrong paths for some files - Load a .env.test.local file when running tests Signed-off-by: Martin Berg Alstad <git@martials.no>
This commit is contained in:
@ -3,9 +3,11 @@ import {
|
||||
ACTUAL_DATA_DIR,
|
||||
ACTUAL_PASSWORD,
|
||||
ACTUAL_SERVER_URL,
|
||||
ACTUAL_SYNC_ID,
|
||||
} from "../config.ts"
|
||||
import type { TransactionEntity } from "@actual-app/api/@types/loot-core/types/models"
|
||||
import { type UUID } from "node:crypto"
|
||||
import logger from "@/logger.ts"
|
||||
|
||||
export interface Actual {
|
||||
importTransactions: (
|
||||
@ -38,6 +40,9 @@ export class ActualImpl implements Actual {
|
||||
// This is the password you use to log into the server
|
||||
password: ACTUAL_PASSWORD,
|
||||
})
|
||||
logger.info(`Initialized ActualBudget API for ${ACTUAL_SERVER_URL}`)
|
||||
await actual.downloadBudget(ACTUAL_SYNC_ID)
|
||||
logger.info(`Downloaded budget`)
|
||||
return new ActualImpl()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user