We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 756da3d commit 3271bccCopy full SHA for 3271bcc
public/js/chat/AuthAPI.js
@@ -9,6 +9,20 @@ class AuthAPI extends DataService {
9
super("authApi");
10
}
11
12
+ /**
13
+ * Check and return current status of the user
14
+ * @returns {Promise<object|null>} Object with the login attribute, if there is no error
15
+ */
16
+ async userStatus() {
17
+ let response = await this.sendRequest(
18
+ "status",
19
+ "POST",
20
+ 200,
21
+ {},
22
+ null);
23
+ return response != null ? response.login : response;
24
+ }
25
+
26
/**
27
* Check and return current status of the user
28
* @returns {Promise<object|null>} Object with attribute login, if there is no error
0 commit comments