fixed remove functions
This commit is contained in:
parent
676db1cac1
commit
467f4ab833
2 changed files with 5 additions and 7 deletions
|
@ -259,8 +259,7 @@ const internalNginx = {
|
||||||
const allHosts = await passthroughHostModel
|
const allHosts = await passthroughHostModel
|
||||||
.query()
|
.query()
|
||||||
.where('is_deleted', 0)
|
.where('is_deleted', 0)
|
||||||
.groupBy('id')
|
.groupBy('id');
|
||||||
.omit(['is_deleted']);
|
|
||||||
host = {
|
host = {
|
||||||
all_passthrough_hosts: allHosts.map((host) => {
|
all_passthrough_hosts: allHosts.map((host) => {
|
||||||
// Replace dots in domain
|
// Replace dots in domain
|
||||||
|
|
|
@ -130,7 +130,7 @@ const internalPassthroughHost = {
|
||||||
.query()
|
.query()
|
||||||
.where('is_deleted', 0)
|
.where('is_deleted', 0)
|
||||||
.andWhere('id', data.id)
|
.andWhere('id', data.id)
|
||||||
.allowEager('[owner]')
|
.allowGraph('[owner]')
|
||||||
.first();
|
.first();
|
||||||
|
|
||||||
if (access_data.permission_visibility !== 'all') {
|
if (access_data.permission_visibility !== 'all') {
|
||||||
|
@ -143,7 +143,7 @@ const internalPassthroughHost = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof data.expand !== 'undefined' && data.expand !== null) {
|
if (typeof data.expand !== 'undefined' && data.expand !== null) {
|
||||||
query.eager('[' + data.expand.join(', ') + ']');
|
query.withGraphFetched('[' + data.expand.join(', ') + ']');
|
||||||
}
|
}
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
|
@ -315,8 +315,7 @@ const internalPassthroughHost = {
|
||||||
.query()
|
.query()
|
||||||
.where('is_deleted', 0)
|
.where('is_deleted', 0)
|
||||||
.groupBy('id')
|
.groupBy('id')
|
||||||
.omit(['is_deleted'])
|
.allowGraph('[owner]')
|
||||||
.allowEager('[owner]')
|
|
||||||
.orderBy('domain_name', 'ASC');
|
.orderBy('domain_name', 'ASC');
|
||||||
|
|
||||||
if (access_data.permission_visibility !== 'all') {
|
if (access_data.permission_visibility !== 'all') {
|
||||||
|
@ -331,7 +330,7 @@ const internalPassthroughHost = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof expand !== 'undefined' && expand !== null) {
|
if (typeof expand !== 'undefined' && expand !== null) {
|
||||||
query.eager('[' + expand.join(', ') + ']');
|
query.withGraphFetched('[' + expand.join(', ') + ']');
|
||||||
}
|
}
|
||||||
|
|
||||||
return query;
|
return query;
|
||||||
|
|
Loading…
Reference in a new issue