You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
866 B
JavaScript
35 lines
866 B
JavaScript
5 years ago
|
const { Route, Handler } = global.Hydro.service.server;
|
||
|
|
||
|
class WikiHelpHandler extends Handler {
|
||
|
async get() {
|
||
|
const path = [
|
||
|
['Hydro', '/'],
|
||
|
['wiki', '/wiki'],
|
||
|
['wiki_help', null],
|
||
|
];
|
||
|
this.response.body = { path };
|
||
|
this.response.template = 'wiki_help.html';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class WikiAboutHandler extends Handler {
|
||
|
async get() {
|
||
|
const path = [
|
||
|
['Hydro', '/'],
|
||
|
['wiki', '/wiki'],
|
||
|
['wiki_about', null],
|
||
|
];
|
||
|
this.response.body = { path };
|
||
|
this.response.template = 'wiki_about.html';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
async function apply() {
|
||
|
Route('/wiki/help', module.exports.WikiHelpHandler);
|
||
|
Route('/wiki/about', module.exports.WikiAboutHandler);
|
||
|
}
|
||
|
|
||
|
global.Hydro.handler.wiki = module.exports = {
|
||
|
WikiHelpHandler, WikiAboutHandler, apply,
|
||
|
};
|