Switched to ok from success on API responses

This commit is contained in:
Jori Lallo
2016-09-11 15:48:03 -07:00
parent b03d6aa116
commit 60e9a700de
4 changed files with 9 additions and 10 deletions

View File

@ -2,11 +2,11 @@ export default function apiWrapper(_options) {
return async function apiWrapperMiddleware(ctx, next) {
await next();
const success = ctx.status < 400;
const ok = ctx.status < 400;
ctx.body = {
...ctx.body,
success,
ok,
};
};
}