fix: edit/create account

This commit is contained in:
Ahmed Bouhuolia
2025-11-07 22:20:06 +02:00
parent 8161439365
commit 80abd1f66f
5 changed files with 11 additions and 16 deletions

View File

@@ -17,7 +17,7 @@ export class CommandAccountValidators {
@Inject(Account.name)
private readonly accountModel: TenantModelProxy<typeof Account>,
private readonly accountRepository: AccountRepository,
) {}
) { }
/**
* Throws error if the account was prefined.
@@ -115,7 +115,7 @@ export class CommandAccountValidators {
accountName: string,
notAccountId?: number,
) {
const foundAccount = await this.accountModel
const foundAccount = await this.accountModel()
.query()
.findOne('name', accountName)
.onBuild((query) => {