glitch-javascript-sdk 0.1.0 → 0.1.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/index.d.ts CHANGED
@@ -1131,15 +1131,15 @@ declare class Waitlists {
1131
1131
 
1132
1132
  declare class Glitch {
1133
1133
  static config: {
1134
- Config: Config;
1134
+ Config: typeof Config;
1135
1135
  };
1136
1136
  static api: {
1137
1137
  Auth: typeof Auth;
1138
- Competitions: Competitions;
1139
- Users: Users;
1140
- Events: Events;
1141
- Teams: Teams;
1142
- Waitlists: Waitlists;
1138
+ Competitions: typeof Competitions;
1139
+ Users: typeof Users;
1140
+ Events: typeof Events;
1141
+ Teams: typeof Teams;
1142
+ Waitlists: typeof Waitlists;
1143
1143
  };
1144
1144
  }
1145
1145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Javascrip SDK for GLitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/index.ts CHANGED
@@ -12,12 +12,12 @@ import { Waitlists } from "./api";
12
12
 
13
13
  class Glitch {
14
14
 
15
- public static config: {
15
+ public static config = {
16
16
  Config: Config
17
17
  };
18
18
 
19
- public static api: {
20
- Auth: typeof Auth,
19
+ public static api = {
20
+ Auth: Auth,
21
21
  Competitions: Competitions,
22
22
  Users: Users,
23
23
  Events: Events,
@@ -57,9 +57,13 @@ class Requests {
57
57
  headers['Content-Type'] = 'multipart/form-data';
58
58
  }
59
59
 
60
+ const uri = `${this.baseUrl}${url}`;
61
+
62
+ const validUri = uri.replace(/\/\//g, '/');
63
+
60
64
  const axiosPromise = axios({
61
65
  method,
62
- url: `${this.baseUrl}${url}`,
66
+ url: validUri,
63
67
  data: fileData || data,
64
68
  headers,
65
69
  });