@itutoring/itutoring_application_js_api 1.6.47 → 1.6.49

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.
@@ -18,6 +18,13 @@ class Authentication
18
18
  static #LOG_IN = "LogIn";
19
19
  static #IS_AUTHENTICATED = "IsAuthenticated";
20
20
  static #GET_USER_INFO = "GetUserInfo";
21
+ static #SIGN_OUT = "SignOut";
22
+
23
+ static async SignOut()
24
+ {
25
+ var res = await APIController.Get(this.#MODULE, this.#SIGN_OUT);
26
+ return res;
27
+ }
21
28
 
22
29
  static async LogIn(email, pass, type)
23
30
  {
@@ -42,8 +49,8 @@ class Authentication
42
49
  var arr = JSON.parse(userString);
43
50
 
44
51
  var user = new AuthUser();
45
- user.AuthenticationMethod = user['AuthenticationMethod'];
46
-
52
+ user.AuthenticationMethod = user['AuthenticationMethod'];
53
+
47
54
  user.ID = arr['ID'];
48
55
  user.Name = arr['Name'];
49
56
  user.Email = arr['Email'];
@@ -20,7 +20,7 @@ class CustomerAuth
20
20
  // All method names
21
21
  static #IS_AUTHENTICATED = "IsAuthenticated";
22
22
  static #LOG_IN = "Login";
23
- static #SIGN_ING = "SignIn";
23
+ static #SIGN_IN = "SignIn";
24
24
 
25
25
  /**
26
26
  * Checks if currunet user(customer) is authenticated or not.
@@ -43,7 +43,7 @@ class CustomerAuth
43
43
  */
44
44
  static async SignIn(email, pass, fname, lname, phone)
45
45
  {
46
- var result = await APIController.Post(this.#MODULE, this.#SIGN_ING, {
46
+ var result = await APIController.Post(this.#MODULE, this.#SIGN_IN, {
47
47
  'email': email,
48
48
  'pass': pass,
49
49
  'fname': fname,
@@ -136,7 +136,7 @@ class ReservationSystem
136
136
  }
137
137
 
138
138
  /**
139
- * Send request for tutoring. Will register as event
139
+ * Send request for tutoring. Will register as inquiry and it's id will be returned.
140
140
  * @param {*} name
141
141
  * @param {*} email
142
142
  * @param {*} tel
@@ -145,7 +145,7 @@ class ReservationSystem
145
145
  */
146
146
  static async SendRequest(fname, lname, email, tel, msg, place)
147
147
  {
148
- await APIController.Post(this.#MODULE, this.#SEND_REQUEST, {
148
+ var id = await APIController.Post(this.#MODULE, this.#SEND_REQUEST, {
149
149
  "fname": fname,
150
150
  "lname": lname,
151
151
  "email": email,
@@ -153,6 +153,7 @@ class ReservationSystem
153
153
  "msg": msg,
154
154
  "place": place
155
155
  })
156
+ return id;
156
157
  }
157
158
  }
158
159
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itutoring/itutoring_application_js_api",
3
- "version": "1.6.47",
3
+ "version": "1.6.49",
4
4
  "description": "Javascript API for iTutoring Application",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",