const Router = require('@koa/router');

const commonCtrl = require('src/controllers/common/index.js');
const v1Router = require('./v1/index.js');

const r = new Router({ prefix: '/api' });
module.exports = r;

// set api handler middleware
r.use(commonCtrl.apiHandler(), commonCtrl.getAppVersion());

r.use(v1Router.routes());
