flamerest 1.0.51 → 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.
- package/REST.js +1 -1
- package/package.json +1 -1
package/REST.js
CHANGED
|
@@ -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]:
|
|
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
|
|