mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 01:36:08 +08:00
35 lines
866 B
JavaScript
35 lines
866 B
JavaScript
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,
|
|
};
|