mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: linking relation with id in importing
This commit is contained in:
@@ -88,7 +88,11 @@ export class CreateItem {
|
||||
* @param {IItemDTO} item
|
||||
* @return {Promise<IItem>}
|
||||
*/
|
||||
public async createItem(tenantId: number, itemDTO: IItemDTO): Promise<IItem> {
|
||||
public async createItem(
|
||||
tenantId: number,
|
||||
itemDTO: IItemDTO,
|
||||
trx?: Knex.Transaction
|
||||
): Promise<IItem> {
|
||||
const { Item } = this.tenancy.models(tenantId);
|
||||
|
||||
// Authorize the item before creating.
|
||||
@@ -111,7 +115,8 @@ export class CreateItem {
|
||||
} as IItemEventCreatedPayload);
|
||||
|
||||
return item;
|
||||
}
|
||||
},
|
||||
trx
|
||||
);
|
||||
return item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user