glitch-javascript-sdk 0.2.2 → 0.2.4

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 CHANGED
@@ -15624,6 +15624,8 @@ var Requests = /** @class */ (function () {
15624
15624
  if (fileData) {
15625
15625
  headers['Content-Type'] = 'multipart/form-data';
15626
15626
  }
15627
+ //Remove double slashes
15628
+ url = url.replace(/\/\//g, '/');
15627
15629
  var uri = "".concat(this.baseUrl).concat(url);
15628
15630
  var axiosPromise = axios({
15629
15631
  method: method,
@@ -16494,7 +16496,8 @@ var CommunitiesRoute = /** @class */ (function () {
16494
16496
  addUser: { url: '/communities/{community_id}/users', method: HTTP_METHODS.POST },
16495
16497
  showUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.GET },
16496
16498
  updateUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.PUT },
16497
- removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE }
16499
+ removeUser: { url: '/communities/{community_id}/users/{user_id}', method: HTTP_METHODS.DELETE },
16500
+ findByDomain: { url: '/communities/findByDomain/{domain}', method: HTTP_METHODS.GET }
16498
16501
  };
16499
16502
  return CommunitiesRoute;
16500
16503
  }());
@@ -16742,6 +16745,16 @@ var Communities = /** @class */ (function () {
16742
16745
  Communities.removetUser = function (community_id, user_id) {
16743
16746
  return Requests.processRoute(CommunitiesRoute.routes.removeUser, {}, { community_id: community_id, user_id: user_id });
16744
16747
  };
16748
+ /**
16749
+ * Finds a community either by its subdomain or cname. The cname must be active.
16750
+ *
16751
+ * @param domain The subcname of the community.
16752
+ *
16753
+ * @returns promise
16754
+ */
16755
+ Communities.findByDomain = function (domain) {
16756
+ return Requests.processRoute(CommunitiesRoute.routes.findByDomain, {}, { domain: domain });
16757
+ };
16745
16758
  return Communities;
16746
16759
  }());
16747
16760