fix: invite user to the system.

fix: soft delete system user.
This commit is contained in:
a.bouhuolia
2021-01-19 13:18:48 +02:00
parent ef53b25c18
commit 59f44d9ef6
17 changed files with 320 additions and 136 deletions

View File

@@ -22,7 +22,6 @@ export default class SystemUserRepository extends SystemRepository {
return this.cache.get(cacheKey, () => {
return this.model.query()
.whereNotDeleted()
.findOne('email', crediential)
.orWhere('phone_number', crediential);
});
@@ -39,7 +38,6 @@ export default class SystemUserRepository extends SystemRepository {
return this.cache.get(cacheKey, () => {
return this.model.query()
.whereNotDeleted()
.findOne({ id: userId, tenant_id: tenantId });
});
}
@@ -53,7 +51,7 @@ export default class SystemUserRepository extends SystemRepository {
const cacheKey = this.getCacheKey('findOneByEmail', email);
return this.cache.get(cacheKey, () => {
return this.model.query().whereNotDeleted().findOne('email', email);
return this.model.query().findOne('email', email);
});
}
@@ -67,7 +65,6 @@ export default class SystemUserRepository extends SystemRepository {
return this.cache.get(cacheKey, () => {
return this.model.query()
.whereNotDeleted()
.findOne('phoneNumber', phoneNumber);
});
}