'use strict'; module.exports = app => { const { router, controller } = app; const profix = '/api/hc/'; const target = 'user'; router.post(target, `${profix}${target}/login`, controller[target].login); router.post(target, `${profix}${target}/password`, controller[target].password); router.resources(target, `${profix}${target}`, controller[target]); // index、create、show、destroy router.post(target, `${profix}${target}/update/:id`, controller[target].update); };