mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
w
This commit is contained in:
parent
d2ef61b8e6
commit
c872671543
3 changed files with 9 additions and 2 deletions
|
@ -31,7 +31,7 @@ export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let exec = require(`${__dirname}/endpoints/${ep.name}`);
|
let exec = require(`${__dirname}/endpoints/${ep.name}`).default;
|
||||||
|
|
||||||
if (ep.withFile && file) {
|
if (ep.withFile && file) {
|
||||||
exec = exec.bind(null, file);
|
exec = exec.bind(null, file);
|
||||||
|
|
|
@ -38,7 +38,7 @@ const client = require('../../../../built/client/meta.json');
|
||||||
/**
|
/**
|
||||||
* Show core info
|
* Show core info
|
||||||
*/
|
*/
|
||||||
export default (params: any) => new Promise(async (res, rej) => {
|
export default () => new Promise(async (res, rej) => {
|
||||||
const meta: any = (await Meta.findOne()) || {};
|
const meta: any = (await Meta.findOne()) || {};
|
||||||
|
|
||||||
res({
|
res({
|
||||||
|
|
|
@ -205,4 +205,11 @@ router.get('/*/api/entities/*', async ctx => {
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.get('/*/*', async ctx => {
|
||||||
|
const lang = ctx.params[0];
|
||||||
|
const doc = ctx.params[1];
|
||||||
|
|
||||||
|
await ctx.render('../../../../src/client/docs/' + doc + '.' + lang, await genVars(lang));
|
||||||
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|
Loading…
Reference in a new issue