42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
// import axios from "axios";
|
|
|
|
// async function listUsersApi(token) {
|
|
// try {
|
|
// const response = await axios.get(`https://api.minerva.krbl.ru/auth/manage/users`,
|
|
// {
|
|
// headers: {
|
|
// "Authorization": `Token ${token}`
|
|
// }
|
|
// })
|
|
// return response
|
|
// }
|
|
// catch (e) {
|
|
// return e
|
|
// }
|
|
// };
|
|
|
|
// async function editUserApi(token, data) {
|
|
// try {
|
|
// const response = await axios.post(`https://api.minerva.krbl.ru/auth/manage/edit`,
|
|
// {
|
|
// "email": data.email,
|
|
// "first_name": data.first_name,
|
|
// "id": data.id,
|
|
// "is_admin": data.is_admin,
|
|
// "last_name": data.last_name,
|
|
// "login": data.login,
|
|
// "phone": data.phone
|
|
// },
|
|
// {
|
|
// headers: {
|
|
// "Authorization": `Token ${token}`
|
|
// }
|
|
// })
|
|
// return response
|
|
// }
|
|
// catch (e) {
|
|
// return e
|
|
// }
|
|
// };
|
|
|
|
// export {listUsersApi, editUserApi}
|