summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2016-12-28 14:44:32 +0100
committerenahum <nahumhbl@gmail.com>2016-12-28 10:44:32 -0300
commit5fd11bd674075c57cb5c6f9e4b90042c1a37b3b5 (patch)
tree25fb7c5adfa7465b235936fac7aa4293ce7e2e79 /webapp/client
parent14f1f4e9b119f00246a7a5f49e607413c99e4f74 (diff)
downloadchat-5fd11bd674075c57cb5c6f9e4b90042c1a37b3b5.tar.gz
chat-5fd11bd674075c57cb5c6f9e4b90042c1a37b3b5.tar.bz2
chat-5fd11bd674075c57cb5c6f9e4b90042c1a37b3b5.zip
Add API call to get a user by their email address (#4884)
* Add API call to get a user by their email address * update per review
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 0c4e04524..1bbd750c3 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -974,6 +974,15 @@ export default class Client {
end(this.handleResponse.bind(this, 'getByUsername', success, error));
}
+ getByEmail(email, success, error) {
+ request.
+ get(`${this.getUsersRoute()}/email/${email}`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ end(this.handleResponse.bind(this, 'getByEmail', success, error));
+ }
+
login(loginId, password, mfaToken, success, error) {
this.doLogin({login_id: loginId, password, token: mfaToken}, success, error);