router.js 440 B

12345678910111213
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. router.get('/', controller.home.index);
  8. router.post('/wechat/upload', controller.files.wxupload);
  9. router.post('/:appid/upload', controller.files.upload);
  10. router.post('/:appid/:catalog/upload', controller.files.upload);
  11. router.post('/:appid/:catalog/:item/upload', controller.files.upload);
  12. };