.department.js 527 B

12345678910111213141516171819202122232425262728293031323334353637
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. '!name'
  5. ]
  6. },
  7. destroy: {
  8. params: ['!id'],
  9. service: 'delete'
  10. },
  11. update: {
  12. params: ['!id'],
  13. requestBody: [
  14. '!name'
  15. ]
  16. },
  17. show: {
  18. parameters: {
  19. params: ['!id']
  20. },
  21. service: 'fetch'
  22. },
  23. index: {
  24. parameters: {
  25. query: {
  26. name: 'name'
  27. }
  28. },
  29. service: 'query',
  30. options: {
  31. query: ['skip', 'limit'],
  32. sort: ['meta.createdAt'],
  33. desc: true,
  34. count: true
  35. }
  36. },
  37. };