glitch-javascript-sdk 0.3.5 → 0.3.6
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/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/util/Requests.ts +17 -0
package/package.json
CHANGED
package/src/util/Requests.ts
CHANGED
|
@@ -197,6 +197,14 @@ class Requests {
|
|
|
197
197
|
|
|
198
198
|
formData.append(filename, file);
|
|
199
199
|
|
|
200
|
+
if (this.community_id) {
|
|
201
|
+
// Add the community_id to the request body
|
|
202
|
+
data = {
|
|
203
|
+
...data,
|
|
204
|
+
communities: [ this.community_id ]
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
200
208
|
for (let key in data) {
|
|
201
209
|
formData.append(key, data[key]);
|
|
202
210
|
}
|
|
@@ -223,6 +231,15 @@ class Requests {
|
|
|
223
231
|
|
|
224
232
|
formData.append(filename, blob);
|
|
225
233
|
|
|
234
|
+
if (this.community_id) {
|
|
235
|
+
// Add the community_id to the request body
|
|
236
|
+
data = {
|
|
237
|
+
...data,
|
|
238
|
+
communities: [ this.community_id ]
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
226
243
|
for (let key in data) {
|
|
227
244
|
formData.append(key, data[key]);
|
|
228
245
|
}
|