HM-125. Добавление работы с пользователями (#59)

This commit is contained in:
Nikolay
2020-08-30 10:58:19 +03:00
committed by GitHub
parent bfe5394e1d
commit ab0fa2cfc3
13 changed files with 453 additions and 42 deletions

View File

@ -31,7 +31,7 @@ class UsersService {
return data;
}
getMe = async () => {
getSelfInfo = async () => {
const {data} = await http.get(`${ROOT_URL}/me`);
return data;
}
@ -69,8 +69,8 @@ class UsersService {
* @param {string} login - Логин пользователя
* @param {UpdateUserOptions} updateOptions - настройки для обновления пользователя
*/
update = async (login, updateOptions) => {
const {data} = await http.put(ROOT_URL, {...updateOptions, login});
update = async (user) => {
const {data} = await http.put(ROOT_URL, user);
return data;
}