@@ -71,7 +71,7 @@ const internalAccessList = {
7171 // re-fetch with expansions
7272 return internalAccessList . get ( access , {
7373 id : data . id ,
74- expand : [ 'owner' , 'items' , 'clients' ]
74+ expand : [ 'owner' , 'items' , 'clients' , 'proxy_hosts.access_list.clients' ]
7575 } , true /* <- skip masking */ ) ;
7676 } )
7777 . then ( ( row ) => {
@@ -81,7 +81,7 @@ const internalAccessList = {
8181 return internalAccessList . build ( row )
8282 . then ( ( ) => {
8383 if ( row . proxy_host_count ) {
84- return internalNginx . reload ( ) ;
84+ return internalNginx . bulkGenerateConfigs ( 'proxy_host' , row . proxy_hosts ) ;
8585 }
8686 } )
8787 . then ( ( ) => {
@@ -216,14 +216,14 @@ const internalAccessList = {
216216 // re-fetch with expansions
217217 return internalAccessList . get ( access , {
218218 id : data . id ,
219- expand : [ 'owner' , 'items' , 'clients' ]
219+ expand : [ 'owner' , 'items' , 'clients' , 'proxy_hosts.access_list.clients' ]
220220 } , true /* <- skip masking */ ) ;
221221 } )
222222 . then ( ( row ) => {
223223 return internalAccessList . build ( row )
224224 . then ( ( ) => {
225225 if ( row . proxy_host_count ) {
226- return internalNginx . reload ( ) ;
226+ return internalNginx . bulkGenerateConfigs ( 'proxy_host' , row . proxy_hosts ) ;
227227 }
228228 } )
229229 . then ( ( ) => {
@@ -254,7 +254,7 @@ const internalAccessList = {
254254 . joinRaw ( 'LEFT JOIN `proxy_host` ON `proxy_host`.`access_list_id` = `access_list`.`id` AND `proxy_host`.`is_deleted` = 0' )
255255 . where ( 'access_list.is_deleted' , 0 )
256256 . andWhere ( 'access_list.id' , data . id )
257- . allowEager ( '[owner,items,clients,proxy_hosts]' )
257+ . allowEager ( '[owner,items,clients,proxy_hosts,proxy_hosts.access_list.clients ]' )
258258 . omit ( [ 'access_list.is_deleted' ] )
259259 . first ( ) ;
260260
0 commit comments