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

[fix] #976 Bug on Duniter UI button "Reset data"

parent d15cd25d
No related branches found
No related tags found
No related merge requests found
......@@ -188,7 +188,7 @@ function Stack(dependencies) {
// Initialize server (db connection, ...)
try {
yield server.plugFileSystem();
server.onPluggedFSHook = () => co(function*() {
// Register the configuration hook for loading phase (overrides the loaded data)
server.dal.loadConfHook = (conf) => co(function*() {
......@@ -206,6 +206,8 @@ function Stack(dependencies) {
}
return clonedConf;
});
})
yield server.plugFileSystem();
const conf = yield server.loadConf();
......
......@@ -90,6 +90,7 @@ function Server (home, memoryOnly, overrideConf) {
logger.debug('Plugging file system...');
const params = yield paramsP;
that.dal = fileDAL(params);
yield that.onPluggedFSHook()
});
this.unplugFileSystem = () => co(function *() {
......@@ -453,6 +454,11 @@ function Server (home, memoryOnly, overrideConf) {
* Default WoT transforming method for certs => links. To be overriden by a module.
*/
this.generatorNewCertsToLinks = () => Promise.resolve({})
/*
* Default hook on file system plugging. To be overriden by module system.
*/
this.onPluggedFSHook = () => Promise.resolve({})
}
util.inherits(Server, stream.Duplex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment