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
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
82352e6363
Коммит
d57ab7a81e
@@ -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);
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user