feat: add uuid to account ids

This commit is contained in:
Julien Calixte
2019-08-27 00:28:05 +02:00
parent ee74bf3276
commit 7a3f168218
4 changed files with 18 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ class AccountService {
public async add(account: IAccount): Promise<PouchDB.Core.Response> {
try {
account.slug = slug(account.name)
const id = couchService.newId('acc')
const id = couchService.newId('acc', true)
account._id = id
account.doctype = 'account'
const response = await couchService.save(account)