react-native-appwrite 0.9.1 → 0.9.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.
- package/dist/cjs/sdk.js +4 -2
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +4 -2
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +5 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "react-native-appwrite",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.2",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/src/client.ts
CHANGED
|
@@ -115,7 +115,7 @@ class Client {
|
|
|
115
115
|
'x-sdk-name': 'React Native',
|
|
116
116
|
'x-sdk-platform': 'client',
|
|
117
117
|
'x-sdk-language': 'reactnative',
|
|
118
|
-
'x-sdk-version': '0.9.
|
|
118
|
+
'x-sdk-version': '0.9.2',
|
|
119
119
|
'X-Appwrite-Response-Format': '1.7.0',
|
|
120
120
|
};
|
|
121
121
|
|
|
@@ -441,9 +441,12 @@ class Client {
|
|
|
441
441
|
let options: RequestInit = {
|
|
442
442
|
method,
|
|
443
443
|
headers,
|
|
444
|
-
credentials: 'include'
|
|
445
444
|
};
|
|
446
445
|
|
|
446
|
+
if (headers['X-Appwrite-Dev-Key'] === undefined) {
|
|
447
|
+
options.credentials = 'include';
|
|
448
|
+
}
|
|
449
|
+
|
|
447
450
|
if (method === 'GET') {
|
|
448
451
|
for (const [key, value] of Object.entries(Service.flatten(params))) {
|
|
449
452
|
url.searchParams.append(key, value);
|