feat: Remove app auth clients relation from app configs
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import App from './app.js';
|
import App from './app.js';
|
||||||
import Base from './base.js';
|
import Base from './base.js';
|
||||||
import AppAuthClient from './app-auth-client.js';
|
|
||||||
|
|
||||||
class AppConfig extends Base {
|
class AppConfig extends Base {
|
||||||
static tableName = 'app_configs';
|
static tableName = 'app_configs';
|
||||||
@@ -22,17 +21,6 @@ class AppConfig extends Base {
|
|||||||
return ['canConnect', 'canCustomConnect'];
|
return ['canConnect', 'canCustomConnect'];
|
||||||
}
|
}
|
||||||
|
|
||||||
static relationMappings = () => ({
|
|
||||||
appAuthClients: {
|
|
||||||
relation: Base.HasManyRelation,
|
|
||||||
modelClass: AppAuthClient,
|
|
||||||
join: {
|
|
||||||
from: 'app_configs.id',
|
|
||||||
to: 'app_auth_clients.app_config_id',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
get canCustomConnect() {
|
get canCustomConnect() {
|
||||||
return !this.disabled && this.allowCustomConnection;
|
return !this.disabled && this.allowCustomConnection;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user