fix invalid js comment, make payee optional
This commit is contained in:
parent
32b5a0d0a5
commit
bb1fcb3d94
6
cli.js
6
cli.js
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
# Note: mostly generated by ChatGPT, I am not a Javascript developer
|
||||
// Note: mostly generated by ChatGPT, I am not a Javascript developer
|
||||
|
||||
const actual = require('@actual-app/api');
|
||||
const yargs = require('yargs/yargs');
|
||||
@ -17,7 +17,7 @@ const { hideBin } = require('yargs/helpers');
|
||||
.option('payee', {
|
||||
alias: 'p',
|
||||
type: 'string',
|
||||
demandOption: true,
|
||||
demandOption: false,
|
||||
describe: 'The name of the payee',
|
||||
})
|
||||
.option('amount', {
|
||||
@ -63,7 +63,7 @@ const { hideBin } = require('yargs/helpers');
|
||||
|
||||
await actual.importTransactions(argv.account, [{
|
||||
imported_payee: argv.payee,
|
||||
payee_name: argv.payee,
|
||||
payee_name: argv.payee ?? '',
|
||||
amount,
|
||||
date: argv.date, // today's date
|
||||
notes: argv.notes ?? ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user