Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

issue with update transactions #7

Open
mohammad-aliB opened this issue Jan 6, 2022 · 1 comment
Open

issue with update transactions #7

mohammad-aliB opened this issue Jan 6, 2022 · 1 comment

Comments

@mohammad-aliB
Copy link

mohammad-aliB commented Jan 6, 2022

when i run update transactions i get the following error:

  Error: [API Error] Tried to edit unknown transaction id: undefined
      at Promise.catch.err (/Users/mohammad/node_modules/@actual-app/api/connection.js:26:13)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:160:7)

the code im using is as follows:

let api = require('@actual-app/api');
async function run() {
  let budget = await api.getAccounts();
  let f= await api.addTransactions('REDACTED',[{date:'2020-01-02'}])
  let e= await api.getTransactions('REDACTED','2020-01-01','2022-01-20');
  let g= await api.updateTransaction(e[e.length-1]["id"],{})
}
api.runWithBudget('My-Finances-b1bae9d', run);

other methods such as api.deleteTransaction() work fine so i know the id i am using is correct.

@culpeppers
Copy link

I am also receiving the same error, @jlongster

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants