.links.js 632 B

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