mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-29 20:10:28 +00:00
added then()
This commit is contained in:
@@ -68,7 +68,7 @@ const internalProxyHost = {
|
|||||||
|
|
||||||
// Update PiHole
|
// Update PiHole
|
||||||
for (let i = 0; i < row.domain_names.length; i++) {
|
for (let i = 0; i < row.domain_names.length; i++) {
|
||||||
piHole.updatePihole(row.domain_names[i], row.forward_host, 'add');
|
piHole.updatePihole(row.domain_names[i], row.forward_host, 'add').then();
|
||||||
}
|
}
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
@@ -77,7 +77,7 @@ const internalProxyHost = {
|
|||||||
|
|
||||||
// Update PiHole
|
// Update PiHole
|
||||||
for (let i = 0; i < row.domain_names.length; i++) {
|
for (let i = 0; i < row.domain_names.length; i++) {
|
||||||
piHole.updatePihole(row.domain_names[i], row.forward_host, 'add');
|
piHole.updatePihole(row.domain_names[i], row.forward_host, 'add').then();
|
||||||
}
|
}
|
||||||
|
|
||||||
return row;
|
return row;
|
||||||
@@ -168,14 +168,14 @@ const internalProxyHost = {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
// Update PiHole
|
// Update PiHole
|
||||||
for (let i = 0; i < row.domain_names.length; i++) {
|
for (let i = 0; i < row.domain_names.length; i++) {
|
||||||
piHole.updatePihole(row.domain_names[i], row.forward_host, 'delete');
|
piHole.updatePihole(row.domain_names[i], row.forward_host, 'delete').then();
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Update PiHole
|
// Update PiHole
|
||||||
for (let i = 0; i < row.domain_names.length; i++) {
|
for (let i = 0; i < row.domain_names.length; i++) {
|
||||||
piHole.updatePihole(row.domain_names[i], row.forward_host, 'delete');
|
piHole.updatePihole(row.domain_names[i], row.forward_host, 'delete').then();
|
||||||
|
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
@@ -224,7 +224,7 @@ const internalProxyHost = {
|
|||||||
row.meta = new_meta;
|
row.meta = new_meta;
|
||||||
row = internalHost.cleanRowCertificateMeta(row);
|
row = internalHost.cleanRowCertificateMeta(row);
|
||||||
for (let i = 0; i < row.domain_names.length; i++) {
|
for (let i = 0; i < row.domain_names.length; i++) {
|
||||||
piHole.updatePihole(row.domain_names[i], row.forward_host, 'add');
|
piHole.updatePihole(row.domain_names[i], row.forward_host, 'add').then();
|
||||||
}
|
}
|
||||||
return _.omit(row, omissions());
|
return _.omit(row, omissions());
|
||||||
});
|
});
|
||||||
@@ -305,7 +305,6 @@ const internalProxyHost = {
|
|||||||
|
|
||||||
for (let i = 0; i < row.domain_names.length; i++) {
|
for (let i = 0; i < row.domain_names.length; i++) {
|
||||||
piHole.updatePihole(row.domain_names[i], row.forward_host, 'delete').then();
|
piHole.updatePihole(row.domain_names[i], row.forward_host, 'delete').then();
|
||||||
console.log('Deleted from PiHole: ' + row.domain_names[i]);
|
|
||||||
}
|
}
|
||||||
// Delete Nginx Config
|
// Delete Nginx Config
|
||||||
return internalNginx.deleteConfig('proxy_host', row)
|
return internalNginx.deleteConfig('proxy_host', row)
|
||||||
|
Reference in New Issue
Block a user