mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
wiki
This commit is contained in:
1 parent
649f65b17d
commit
e3bbff7e11
22 files changed
+315
-441
No files matched your search
@@ -0,0 +1,34 @@
|
||||
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,
|
||||
};
|
||||
Reference in new issue
Block a user