flamerest 1.0.104 → 1.0.106
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 +3 -3
- package/package.json +1 -1
package/REST.js
CHANGED
|
@@ -117,8 +117,8 @@ class FLAMEREST {
|
|
|
117
117
|
SIGN = await this.hmac_sha256(requestBody.body, user_hash);
|
|
118
118
|
}
|
|
119
119
|
catch (ex) {
|
|
120
|
-
window.alert('Can`t create a request');
|
|
121
|
-
throw ex;
|
|
120
|
+
// window.alert('Can`t create a request');
|
|
121
|
+
// throw ex;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
requestBody.headers['sign'] = SIGN;
|
|
@@ -773,7 +773,7 @@ class FLAMEREST {
|
|
|
773
773
|
*/
|
|
774
774
|
async hmac_sha256(message, secret_key) {
|
|
775
775
|
|
|
776
|
-
if (!(typeof
|
|
776
|
+
if (!(typeof message === 'string') && !(typeof secret_key === 'string'))
|
|
777
777
|
throw new TypeError('Expected string input data.')
|
|
778
778
|
|
|
779
779
|
const enc = new TextEncoder();
|