.news.js 925 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. 'column_id',
  5. 'column_name',
  6. '!title',
  7. 'orgin',
  8. 'publish',
  9. 'content',
  10. 'picture'
  11. ]
  12. },
  13. destroy: {
  14. params: ['!id'],
  15. service: 'delete'
  16. },
  17. update: {
  18. params: ['!id'],
  19. requestBody: [
  20. 'column_id',
  21. 'column_name',
  22. '!title',
  23. 'orgin',
  24. 'publish',
  25. 'content',
  26. 'picture'
  27. ]
  28. },
  29. show: {
  30. parameters: {
  31. params: ['!id']
  32. },
  33. service: 'fetch'
  34. },
  35. index: {
  36. parameters: {
  37. query: {
  38. column_id : 'column_id',
  39. column_name : 'column_name',
  40. title : 'title',
  41. orgin : 'orgin',
  42. publish: 'publish',
  43. content : 'content',
  44. picture : 'picture'
  45. }
  46. },
  47. service: 'query',
  48. options: {
  49. query: ['skip', 'limit'],
  50. sort: ['meta.createdAt'],
  51. desc: true,
  52. count: true
  53. }
  54. },
  55. };