summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-09-14 08:57:33 -0400
committerenahum <nahumhbl@gmail.com>2016-09-14 09:57:33 -0300
commit837808eba389f1f74da8200b35d1fdc7ea14900e (patch)
tree69742d74ccd39ad7313bb382e94462699c4ff790 /webapp/client
parentabe6e8e47114c8757f064bba072ef71541b3ed7d (diff)
downloadchat-837808eba389f1f74da8200b35d1fdc7ea14900e.tar.gz
chat-837808eba389f1f74da8200b35d1fdc7ea14900e.tar.bz2
chat-837808eba389f1f74da8200b35d1fdc7ea14900e.zip
Update getUser API and add it to the JS driver (#4020)
Diffstat (limited to 'webapp/client')
-rw-r--r--webapp/client/client.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 6aabee080..a5d179a0d 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -856,6 +856,15 @@ export default class Client {
end(this.handleResponse.bind(this, 'getMe', success, error));
}
+ getUser(userId, success, error) {
+ request.
+ get(`${this.getUserNeededRoute(userId)}/get`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ end(this.handleResponse.bind(this, 'getUser', success, error));
+ }
+
login(loginId, password, mfaToken, success, error) {
this.doLogin({login_id: loginId, password, token: mfaToken}, success, error);