.channel.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. module.exports = {
  2. create: {
  3. requestBody: [
  4. "!user_id",
  5. "title",
  6. "desc",
  7. "province",
  8. "place",
  9. "sponsor",
  10. "organizer",
  11. "image_path",
  12. "videodata",
  13. "orgin",
  14. ],
  15. },
  16. destroy: {
  17. params: ["!id"],
  18. service: "delete",
  19. },
  20. update: {
  21. params: ["!id"],
  22. requestBody: [
  23. "!user_id",
  24. "title",
  25. "desc",
  26. "province",
  27. "place",
  28. "sponsor",
  29. "organizer",
  30. "image_path",
  31. "videodata",
  32. "orgin",
  33. ],
  34. },
  35. show: {
  36. parameters: {
  37. params: ["!id"],
  38. },
  39. service: "fetch",
  40. },
  41. index: {
  42. parameters: {
  43. query: {
  44. user_id: "user_id",
  45. title: "title",
  46. desc: "desc",
  47. province: "province",
  48. place: "place",
  49. sponsor: "sponsor",
  50. organizer: "organizer",
  51. image_path: "image_path",
  52. videodata: "videodata",
  53. orgin: "orgin",
  54. },
  55. },
  56. service: "query",
  57. options: {
  58. query: ["skip", "limit"],
  59. sort: ["meta.createdAt"],
  60. desc: true,
  61. count: true,
  62. },
  63. },
  64. };