@itutoring/itutoring_application_js_api 1.0.24 → 1.1.0

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.
@@ -1,3 +1,4 @@
1
+ import TeacherProfile from "../objects/TeacherProfile";
1
2
  import APIController from "./../apiController";
2
3
  import Teacher from "./../objects/Teacher";
3
4
 
@@ -37,12 +38,12 @@ class TeacherManager
37
38
  static async GetAllTeachers()
38
39
  {
39
40
  var teachers = await APIController.Get(this.#MODULE, this.#GET_ALL_TEACHERS);
40
-
41
+
41
42
  var teachersArray = JSON.parse(teachers);
42
43
 
43
44
  var teachersClasses = [];
44
45
 
45
- for (const[key, value] of Object.entries(teachersArray))
46
+ for (const [key, value] of Object.entries(teachersArray))
46
47
  {
47
48
  var teacher = new Teacher;
48
49
 
@@ -53,6 +54,13 @@ class TeacherManager
53
54
  teacher.TeachedLessons = value['TeachedLessons'];
54
55
  teacher.Admin = APIController.IntToBool(value['Admin']);
55
56
 
57
+ var teacherProfile = new TeacherProfile();
58
+ teacherProfile.Bio = value['Profile']['Bio'];
59
+ teacherProfile.Name = value['Profile']['Name'];
60
+ teacherProfile.PhotoPath = value['Profile']['PhotoPath'];
61
+
62
+ teacher.TeacherProfile = teacherProfile;
63
+
56
64
  teachersClasses[teacher.ID] = teacher;
57
65
  }
58
66
 
@@ -1,3 +1,4 @@
1
+ import TeacherProfile from "../objects/TeacherProfile";
1
2
  import APIController from "./../apiController";
2
3
  import Reservation from "./../objects/Reservation";
3
4
  import Teacher from "./../objects/Teacher";
@@ -135,6 +136,13 @@ class TeacherPortal
135
136
  teacher.Admin = teacherArray['Admin'];
136
137
  teacher.BitmojiURL = decodeURIComponent(teacherArray['BitmojiURL']);
137
138
 
139
+ var teacherProfile = new TeacherProfile();
140
+ teacherProfile.Bio = teacherArray['Profile']['Bio'];
141
+ teacherProfile.Name = teacherArray['Profile']['Name'];
142
+ teacherProfile.PhotoPath = teacherArray['Profile']['PhotoPath'];
143
+
144
+ teacher.TeacherProfile = teacherProfile;
145
+
138
146
  return teacher;
139
147
  }
140
148
 
@@ -0,0 +1,21 @@
1
+ import APIController from "../apiController"
2
+
3
+ class WebinarSystem
4
+ {
5
+ /**
6
+ * Respective module name for this class
7
+ */
8
+ static #MODULE = "WebinarsSystem"
9
+
10
+ // All method names
11
+ static #REGISTER = "Register"
12
+
13
+ static async Register(email)
14
+ {
15
+ var res = await APIController.Post(this.#MODULE, this.#REGISTER, {
16
+ "email": email,
17
+ });
18
+
19
+ return APIController.IntToBool(res);
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itutoring/itutoring_application_js_api",
3
- "version": "1.0.24",
3
+ "version": "1.1.0",
4
4
  "description": "Javascript API for iTutoring Application",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",