flamerest 1.0.49 → 1.0.52

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/REST.js +2 -2
  2. package/package.json +1 -1
package/REST.js CHANGED
@@ -355,7 +355,7 @@ class FLAMEREST {
355
355
  * @returns {object}
356
356
  */
357
357
  all(table, params) {
358
- return this.get(table, params.where, null, params.fields, params.sort, params.page, params.perPage);
358
+ return this.get(table, params?.where, null, params?.fields, params?.sort, params?.page, params?.perPage, null, null, null, params?.tree);
359
359
  }
360
360
 
361
361
  /**
@@ -369,7 +369,7 @@ class FLAMEREST {
369
369
  async one(table, IDOrWhere, fields = null, primaryKeyName = 'id') {
370
370
 
371
371
  let where = {};
372
- if (typeof IDOrWhere === 'string' || typeof IDOrWhere === 'number') where = { [primaryKeyName]: id };
372
+ if (typeof IDOrWhere === 'string' || typeof IDOrWhere === 'number') where = { [primaryKeyName]: IDOrWhere };
373
373
  else if (typeof IDOrWhere === 'object') where = IDOrWhere;
374
374
  else throw "Нужно передавать ID или объект";
375
375
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flamerest",
3
- "version": "1.0.49",
3
+ "version": "1.0.52",
4
4
  "description": "",
5
5
  "main": "REST.js",
6
6
  "typings": "./REST.d.ts",