This commit is contained in:
Adrian Obelmejias
2016-02-11 15:43:51 -05:00
parent bdc0e5a4e9
commit 6313446d9d
3 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import users from './users'
exports = module.exports = function Controllers (app) {
exports = module.exports = function Controllers(app) {
app
.use(users.routes())
.use(users.allowedMethods())
-1
View File
@@ -1,5 +1,4 @@
import Router from 'koa-router'
import config from '../../config/config'
const router = new Router({ prefix: '/users' })
+1 -1
View File
@@ -1,7 +1,7 @@
export function errorMiddleware() {
return async (ctx, next) => {
try {
await next();
await next()
} catch (err) {
ctx.status = err.status || 500
ctx.body = err.message