remult 0.27.8-next.1 → 0.27.8-next.2

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.
@@ -196,9 +196,13 @@ export class RestEntityDataProvider {
196
196
  if (action)
197
197
  u.add('__action', action);
198
198
  if (filterObject) {
199
- body = { set: body, where: filterObject };
199
+ if (method === 'put') {
200
+ return this.http().post(u.url, { set: body, where: filterObject });
201
+ }
202
+ else
203
+ body = { ...body, where: filterObject };
200
204
  }
201
- if (body)
205
+ if (body && method != 'put')
202
206
  return this.http().post(u.url, body);
203
207
  else
204
208
  return this.http()[method](u.url, body);
@@ -6,10 +6,7 @@ export const flags = {
6
6
  //p1 filter.apply ApiPreFilter
7
7
  //p1 - add not as an overload to not equal
8
8
  /*p1 - min, max, avg, sum, countDistinct - noam come up with an api
9
- p1 - order by $count
10
9
  p1 - handle relations
11
- p1 - mongodb
12
- p1 - knex
13
10
  */
14
11
  /*p1 - add id and use uuid by default, but allow changes with Fields.id.defaultIdProvider NO but defaultProvider yes???
15
12
  //p1 - replace uuid with crypto.randomUUID and allow custom fallback NO
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "0.27.8-next.1",
3
+ "version": "0.27.8-next.2",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {
@@ -273,9 +273,13 @@ var RestEntityDataProvider = /** @class */ (function () {
273
273
  if (action)
274
274
  u.add('__action', action);
275
275
  if (filterObject) {
276
- body = { set: body, where: filterObject };
276
+ if (method === 'put') {
277
+ return _this.http().post(u.url, { set: body, where: filterObject });
278
+ }
279
+ else
280
+ body = tslib_1.__assign(tslib_1.__assign({}, body), { where: filterObject });
277
281
  }
278
- if (body)
282
+ if (body && method != 'put')
279
283
  return _this.http().post(u.url, body);
280
284
  else
281
285
  return _this.http()[method](u.url, body);
@@ -9,10 +9,7 @@ exports.flags = {
9
9
  //p1 filter.apply ApiPreFilter
10
10
  //p1 - add not as an overload to not equal
11
11
  /*p1 - min, max, avg, sum, countDistinct - noam come up with an api
12
- p1 - order by $count
13
12
  p1 - handle relations
14
- p1 - mongodb
15
- p1 - knex
16
13
  */
17
14
  /*p1 - add id and use uuid by default, but allow changes with Fields.id.defaultIdProvider NO but defaultProvider yes???
18
15
  //p1 - replace uuid with crypto.randomUUID and allow custom fallback NO