glitch-javascript-sdk 0.4.1 → 0.4.3
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 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +8 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/util/Session.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/api/Competitions.ts +1 -1
- package/src/util/Session.ts +10 -0
package/dist/index.d.ts
CHANGED
|
@@ -1746,6 +1746,7 @@ declare class Session {
|
|
|
1746
1746
|
static getFirstName(): string | null;
|
|
1747
1747
|
static getLastName(): string | null;
|
|
1748
1748
|
static getEmail(): string | null;
|
|
1749
|
+
static hasJoinedCommunity(): boolean;
|
|
1749
1750
|
static end(): void;
|
|
1750
1751
|
static processAuthentication(data: {
|
|
1751
1752
|
token: {
|
package/package.json
CHANGED
package/src/api/Competitions.ts
CHANGED
|
@@ -690,7 +690,7 @@ class Competitions {
|
|
|
690
690
|
* @returns promise
|
|
691
691
|
*/
|
|
692
692
|
public static me<T>(competition_id : string, params?: Record<string, any>): AxiosPromise<Response<T>>{
|
|
693
|
-
return Requests.processRoute(CompetitionRoutes.routes.
|
|
693
|
+
return Requests.processRoute(CompetitionRoutes.routes.me, {}, {competition_id : competition_id}, params);
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
696
|
|
package/src/util/Session.ts
CHANGED
|
@@ -34,6 +34,16 @@ class Session {
|
|
|
34
34
|
return Storage.get(Session._email_key);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
public static hasJoinedCommunity() {
|
|
38
|
+
const community = Storage.get('community');
|
|
39
|
+
|
|
40
|
+
if(!community) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (community?.me) ? true : false;
|
|
45
|
+
}
|
|
46
|
+
|
|
37
47
|
public static end(): void {
|
|
38
48
|
Storage.setAuthToken(null);
|
|
39
49
|
Storage.set(Session._id_key, null);
|