.answerchat.js 909 B

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