summaryrefslogtreecommitdiffstats
path: root/webapp/client
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2016-11-22 00:50:57 +0100
committerJoram Wilander <jwawilander@gmail.com>2016-11-21 18:50:57 -0500
commitd57ab7a81e295c0f1a731f1f4f5fa04d5cba398b (patch)
tree92c3505680dbecce1bc933d1257194fd0b6b6790 /webapp/client
parent82352e63633f95d546fc2d4b9f768a62cb4b6d58 (diff)
downloadchat-d57ab7a81e295c0f1a731f1f4f5fa04d5cba398b.tar.gz
chat-d57ab7a81e295c0f1a731f1f4f5fa04d5cba398b.tar.bz2
chat-d57ab7a81e295c0f1a731f1f4f5fa04d5cba398b.zip
PLT-3762 - Add API call to get a user by their username (#4611)
* PLT-3762 - Add API call to get a user by their username * fix lint * update rote * update per code review * update per code review * remove first/last name is not used in this test
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 538e82a72..092c2da4a 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -921,6 +921,15 @@ export default class Client {
end(this.handleResponse.bind(this, 'getUser', success, error));
}
+ getByUsername(userName, success, error) {
+ request.
+ get(`${this.getUsersRoute()}/name/${userName}`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ end(this.handleResponse.bind(this, 'getByUsername', success, error));
+ }
+
login(loginId, password, mfaToken, success, error) {
this.doLogin({login_id: loginId, password, token: mfaToken}, success, error);