const express = require('express');
const initHelpers = require('./helpers');
const initDeploy = require('./deploy');
const initRemoval = require('./removal');
const initTemplates = require('./templates');
const initRestore = require('./restore');

module.exports = function(ctx) {
  const router = express.Router();
  const helpers = initHelpers(ctx);

  router.use(initDeploy(ctx, helpers));
  router.use(initRemoval(ctx, helpers));
  router.use(initTemplates(ctx, helpers));
  router.use(initRestore(ctx, helpers));

  return router;
};
