良い感じに

This commit is contained in:
syuilo
2018-07-16 03:43:36 +09:00
parent 1e4a86da8e
commit 1744316656
8 changed files with 76 additions and 50 deletions

View File

@ -168,14 +168,15 @@ router.get('/assets/*', async ctx => {
router.get('/*/api/endpoints/*', async ctx => {
const lang = ctx.params[0];
const ep = require('../../../built/server/api/endpoints/' + ctx.params[1]).meta;
const name = ctx.params[1];
const ep = require('../../../built/server/api/endpoints/' + name).meta || {};
const vars = {
title: ep.name,
endpoint: ep.name,
title: name,
endpoint: name,
url: {
host: config.api_url,
path: ep.name
path: name
},
desc: ep.desc,
// @ts-ignore