.admin.js 653 B

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