person.js 478 B

12345678910111213141516171819202122232425262728293031
  1. const person_ctrl = require('../controllers/person');
  2. module.exports = [
  3. {
  4. url: '/person',
  5. method: 'get',
  6. func: person_ctrl.get_all
  7. },
  8. {
  9. url: '/person',
  10. method: 'post',
  11. func: person_ctrl.create
  12. },
  13. {
  14. url: '/person/:person_id',
  15. method: 'get',
  16. func: person_ctrl.get_by_id
  17. },
  18. {
  19. url: '/person/:person_id',
  20. method: 'put',
  21. func: person_ctrl.update_by_id
  22. },
  23. {
  24. url: '/person/:person_id',
  25. method: 'delete',
  26. func: person_ctrl.delete_by_id
  27. }
  28. ];