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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -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
  }