feat(app-config): update canConnect upon dependent changes

This commit is contained in:
Ali BARIN
2024-10-08 12:17:44 +00:00
committed by Faruk AYDIN
parent f5d796ea77
commit aed61209fa
4 changed files with 68 additions and 16 deletions

View File

@@ -63,7 +63,7 @@ class AppAuthClient extends Base {
async triggerAppConfigUpdate() {
const appConfig = await this.$relatedQuery('appConfig').select('*');
await appConfig.$query().patch({});
await appConfig?.updateCanConnectProperty();
}
// TODO: Make another abstraction like beforeSave instead of using
@@ -84,8 +84,8 @@ class AppAuthClient extends Base {
this.encryptData();
}
async $afterUpdate(queryContext) {
await super.$afterUpdate(queryContext);
async $afterUpdate(opt, queryContext) {
await super.$afterUpdate(opt, queryContext);
await this.triggerAppConfigUpdate();
}