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

issue with update transactions #7

Description

@mohammad-aliB

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions