Skip to content
Snippets Groups Projects
Commit af31bb39 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix #397 Regenerate self peer after a synchronization

parent 21709dea
Branches
Tags
No related merge requests found
...@@ -200,6 +200,12 @@ function WebAdmin (dbConf, overConf) { ...@@ -200,6 +200,12 @@ function WebAdmin (dbConf, overConf) {
return found; return found;
}); });
this.publishANewSelfPeer = (req) => co(function *() {
yield pluggedConfP;
yield server.recomputeSelfPeer();
return {};
});
this.applyNetworkConf = (req) => co(function *() { this.applyNetworkConf = (req) => co(function *() {
yield pluggedConfP; yield pluggedConfP;
const conf = http2raw.conf(req); const conf = http2raw.conf(req);
......
...@@ -27,6 +27,7 @@ module.exports = function(dbConf, overConf, interfaces, httpLogs) { ...@@ -27,6 +27,7 @@ module.exports = function(dbConf, overConf, interfaces, httpLogs) {
httpMethods.httpPOST( '/webmin/server/send_conf', webminCtrl.sendConf, dtos.Identity); httpMethods.httpPOST( '/webmin/server/send_conf', webminCtrl.sendConf, dtos.Identity);
httpMethods.httpPOST( '/webmin/server/net_conf', webminCtrl.applyNetworkConf, dtos.Boolean); httpMethods.httpPOST( '/webmin/server/net_conf', webminCtrl.applyNetworkConf, dtos.Boolean);
httpMethods.httpPOST( '/webmin/server/key_conf', webminCtrl.applyNewKeyConf, dtos.Boolean); httpMethods.httpPOST( '/webmin/server/key_conf', webminCtrl.applyNewKeyConf, dtos.Boolean);
httpMethods.httpGET( '/webmin/server/republish_selfpeer', webminCtrl.publishANewSelfPeer, dtos.Boolean);
httpMethods.httpPOST( '/webmin/server/start_sync', webminCtrl.startSync, dtos.Boolean); httpMethods.httpPOST( '/webmin/server/start_sync', webminCtrl.startSync, dtos.Boolean);
httpMethods.httpGET( '/webmin/server/auto_conf_network', webminCtrl.autoConfNetwork, dtos.Boolean); httpMethods.httpGET( '/webmin/server/auto_conf_network', webminCtrl.autoConfNetwork, dtos.Boolean);
httpMethods.httpGET( '/webmin/server/services/start_all', webminCtrl.startAllServices, dtos.Boolean); httpMethods.httpGET( '/webmin/server/services/start_all', webminCtrl.startAllServices, dtos.Boolean);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment