@itutoring/itutoring_application_js_api 1.4.3 → 1.4.5
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.
|
@@ -26,6 +26,13 @@ class TeacherProfileModule
|
|
|
26
26
|
static #GET_BIO = "GetBio";
|
|
27
27
|
static #IS_PUBLIC_PROFILE_ACTIVE = "IsPublicProfileActive";
|
|
28
28
|
static #GET_PROFILE_PICTURE = "GetProfilePicture";
|
|
29
|
+
static #GET_TEACHER_INFO = "GetTeacherInfo";
|
|
30
|
+
|
|
31
|
+
static async getTeacherInfo()
|
|
32
|
+
{
|
|
33
|
+
var data = await APIController.Get(this.#MODULE, this.#GET_TEACHER_INFO);
|
|
34
|
+
return JSON.parse(data);
|
|
35
|
+
}
|
|
29
36
|
|
|
30
37
|
static async getProfilePicture()
|
|
31
38
|
{
|
package/package.json
CHANGED
package/toolkit/Toolkit.jsx
CHANGED
|
@@ -32,8 +32,6 @@ class Toolkit
|
|
|
32
32
|
var data = await APIController.Post(this.#MODULE, this.#REQUEST_ACCESS, {
|
|
33
33
|
'uid': moduleUid
|
|
34
34
|
});
|
|
35
|
-
|
|
36
|
-
this.CheckForError(data);
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
/**
|
|
@@ -47,19 +45,8 @@ class Toolkit
|
|
|
47
45
|
'uid': moduleUid
|
|
48
46
|
});
|
|
49
47
|
|
|
50
|
-
this.CheckForError(info);
|
|
51
|
-
|
|
52
48
|
return JSON.parse(info);
|
|
53
49
|
}
|
|
54
|
-
|
|
55
|
-
static async CheckForError(data)
|
|
56
|
-
{
|
|
57
|
-
if (data.includes("error: "))
|
|
58
|
-
{
|
|
59
|
-
data = data.replace("error: ", "");
|
|
60
|
-
location.href = data
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
50
|
}
|
|
64
51
|
|
|
65
52
|
export default Toolkit;
|