mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-25 23:53:07 +01:00
Access lists
This commit is contained in:
1 parent
13f08df46c
commit
7d9e716c7c
8 files changed
+38
-29
No files matched your search
@@ -33,6 +33,8 @@ class AccessList extends Model {
|
||||
}
|
||||
|
||||
static get relationMappings () {
|
||||
const ProxyHost = require('./proxy_host');
|
||||
|
||||
return {
|
||||
owner: {
|
||||
relation: Model.HasOneRelation,
|
||||
@@ -56,6 +58,18 @@ class AccessList extends Model {
|
||||
modify: function (qb) {
|
||||
qb.omit(['id', 'created_on', 'modified_on']);
|
||||
}
|
||||
},
|
||||
proxy_hosts: {
|
||||
relation: Model.HasManyRelation,
|
||||
modelClass: ProxyHost,
|
||||
join: {
|
||||
from: 'access_list.id',
|
||||
to: 'proxy_host.access_list_id'
|
||||
},
|
||||
modify: function (qb) {
|
||||
qb.where('proxy_host.is_deleted', 0);
|
||||
qb.omit(['id', 'created_on', 'modified_on', 'is_deleted', 'meta']);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user