fix: Server error if X-Editor-Version is not valid semver string
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import stream from "stream";
|
||||
import { Context } from "koa";
|
||||
import { Context, Next } from "koa";
|
||||
|
||||
export default function apiWrapper() {
|
||||
return async function apiWrapperMiddleware(
|
||||
ctx: Context,
|
||||
next: () => Promise<any>
|
||||
) {
|
||||
return async function apiWrapperMiddleware(ctx: Context, next: Next) {
|
||||
await next();
|
||||
const ok = ctx.status < 400;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user