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

[fix] Modules must be accessed through a sub-route "/modules"

parent a3d48730
Branches
Tags
No related merge requests found
......@@ -60,6 +60,17 @@ module.exports = () => {
}
};
window.openModule = function openWindow(path, options, callback) {
const url = window.location.origin + '/modules' + path
if (window.gui) {
// Duniter Desktop
window.gui.Window.open(url, options, callback);
} else {
// Browser
window.open(url, '_blank ');
}
};
window.openExternal = function openExternal(url) {
if (window.gui) {
window.gui.Shell.openExternal(url);
......
......@@ -89,7 +89,9 @@ module.exports = {
for (const dep of uiDeps) {
// Eventual HTTP routing
if (dep.required.duniterUI.route) {
dep.required.duniterUI.route(app, server, conf, program, params)
const subApp = express()
dep.required.duniterUI.route(subApp, server, conf, program, params)
app.use('/modules/', subApp)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment