always return 200 if next is handling a route

This commit is contained in:
41666 2019-03-21 10:07:10 -05:00
parent 309b02c6f6
commit a41ec5d807

View file

@ -7,6 +7,7 @@ export default (R: Router, $: AppContext) => {
const processMappings = (mapping: { [path: string]: { path: string, noAutoFix?: boolean } }) => {
for (let p in mapping) {
R.get(p, (ctx: Context) => {
ctx.status = 200
return $.ui.render(ctx.req, ctx.res, mapping[p].path || mapping[p], { ...ctx.query, ...ctx.params })
})