PLT-4697 Update channel switcher to autocomplete all users on the system (#4624)
* Add autocomplete API for system-wide users * Update channel switcher to autocomplete all users on the system
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
ad52183248
Коммит
02d581c159
@@ -1112,7 +1112,7 @@ export default class Client {
|
||||
set(this.defaultHeaders).
|
||||
type('application/json').
|
||||
accept('application/json').
|
||||
end(this.handleResponse.bind(this, 'autocompleteUsers', success, error));
|
||||
end(this.handleResponse.bind(this, 'autocompleteUsersInChannel', success, error));
|
||||
}
|
||||
|
||||
autocompleteUsersInTeam(term, success, error) {
|
||||
@@ -1121,6 +1121,15 @@ export default class Client {
|
||||
set(this.defaultHeaders).
|
||||
type('application/json').
|
||||
accept('application/json').
|
||||
end(this.handleResponse.bind(this, 'autocompleteUsersInTeam', success, error));
|
||||
}
|
||||
|
||||
autocompleteUsers(term, success, error) {
|
||||
request.
|
||||
get(`${this.getUsersRoute()}/autocomplete?term=${encodeURIComponent(term)}`).
|
||||
set(this.defaultHeaders).
|
||||
type('application/json').
|
||||
accept('application/json').
|
||||
end(this.handleResponse.bind(this, 'autocompleteUsers', success, error));
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user