fix: trasaction creation

This commit is contained in:
Julien Calixte
2019-09-07 09:13:38 +02:00
parent 7a3f168218
commit ca5101816f

View File

@@ -62,7 +62,7 @@ class TransactionService {
transaction: ITransaction
): Promise<PouchDB.Core.Response> {
try {
transaction._id = couchService.newId('tra', accountId)
transaction._id = couchService.newId(`tra-${accountId}`)
transaction.doctype = 'transaction'
transaction = await this.encrypt(transaction)
return await couchService.save(transaction)