const { post } = require('koa-route');
const schemas = require('schemas');
const { users } = require('src/api');
const { create } = require('src/middleware/api/methods');


module.exports = [
  post('/users/', create(schemas.definitions.user.new, users.create))
];

const _ = require('koa-route');
const schemas = require('schemas');
const { users } = require('src/api');
const { create } = require('src/middleware/api/methods');


module.exports = [
  _.post('/users/', create(schemas.definitions.user.new, users.create))
];

Use koa-route as object rather than using its functions directly
Use koa-route as object rather than using its functions directly
