dchester / epilogue

Create flexible REST endpoints and controllers from Sequelize models in your Express app
846 stars 116 forks source link

How can I assign fetching items to POST request? #238

Open nkovalenko93 opened 5 years ago

nkovalenko93 commented 5 years ago

Hi. I have to create POST for fetching items (problem with query parameters length). But I can't assign POST request to list.fetch epilogue action. Can I do this somehow?

Or is it possible to run epilogue workflow from my custom route? Something like:

app.post(`/api/getItems`, (req, res, next) => {
  req.query = req.body;
  itemsEpilogueResource.list(req, res); // or some other hack
});