@mongoosejs/studio 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/backend/next.js +1 -1
  2. package/package.json +1 -1
package/backend/next.js CHANGED
@@ -7,6 +7,7 @@ module.exports = function next() {
7
7
  const backend = Backend();
8
8
 
9
9
  return function wrappedNextJSFunction(req, res) {
10
+ const params = { ...req.query, ...req.body, ...req.params };
10
11
  const actionName = params?.action;
11
12
  if (typeof actionName !== 'string') {
12
13
  throw new Error('No action specified');
@@ -23,7 +24,6 @@ module.exports = function next() {
23
24
  throw new Error(`Action ${actionName} not found`);
24
25
  }
25
26
 
26
- const params = { ...req.query, ...req.body, ...req.params };
27
27
  return actionFn(params)
28
28
  .then(result => res.status(200).json(result))
29
29
  .catch(error => res.status(500).json({ message: error.message }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongoosejs/studio",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "dependencies": {
5
5
  "archetype": "0.13.0",
6
6
  "csv-stringify": "6.3.0",