flamerest 1.0.97 → 1.0.99

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 (3) hide show
  1. package/REST.d.ts +1 -1
  2. package/REST.js +6 -0
  3. package/package.json +1 -1
package/REST.d.ts CHANGED
@@ -92,7 +92,7 @@ interface IREST {
92
92
  * @param {object|Array} fields
93
93
  * @param {string} primaryKeyName если указан ID, то указать название первичного ключа, если от id он отличается
94
94
  */
95
- one<T>(table: string, IDOrWhere: number | string | object, extfields?: object | Array<string>, fields?: object | Array<string> | null, primaryKeyName?: string): Promise<Row<T>>,
95
+ one<T>(table: string, IDOrWhere: number | string | object, extfields?: object | Array<string>, fields?: object | Array<string> | null, primaryKeyName?: string): Promise<T | null>,
96
96
 
97
97
  /**
98
98
  * Создать новую запись
package/REST.js CHANGED
@@ -88,6 +88,12 @@ class FLAMEREST {
88
88
  }
89
89
  }
90
90
 
91
+ // Уникальный user_hash
92
+ let user_hash = localStorage.getItem('user_hash');
93
+ if (user_hash) {
94
+ Object.assign(customHeaders, { udata: user_hash });
95
+ }
96
+
91
97
  // Тело запроса
92
98
  let requestBody = {
93
99
  method: type,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flamerest",
3
- "version": "1.0.97",
3
+ "version": "1.0.99",
4
4
  "description": "",
5
5
  "main": "REST.js",
6
6
  "typings": "./REST.d.ts",