2019-02-23 21:40:26 +00:00
|
|
|
import request from '@/utils/request'
|
|
|
|
|
2019-03-03 21:25:25 +00:00
|
|
|
export async function fetchUsers(page = 1) {
|
2019-02-23 21:40:26 +00:00
|
|
|
return await request({
|
2019-03-03 21:25:25 +00:00
|
|
|
url: `/api/pleroma/admin/users?page=${page}`,
|
2019-02-23 21:40:26 +00:00
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-02-26 19:50:25 +00:00
|
|
|
export async function toggleUserActivation(nickname) {
|
|
|
|
return await request({
|
|
|
|
url: `/api/pleroma/admin/users/${nickname}/toggle_activation`,
|
|
|
|
method: 'patch'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-03-03 21:25:25 +00:00
|
|
|
export async function searchUsers(query, page = 1) {
|
2019-03-01 17:32:03 +00:00
|
|
|
return await request({
|
2019-03-03 21:25:25 +00:00
|
|
|
url: `/api/pleroma/admin/users/search?query=${query}&page=${page}`,
|
2019-03-01 17:32:03 +00:00
|
|
|
method: 'get'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2019-02-26 19:50:25 +00:00
|
|
|
export default { fetchUsers, toggleUserActivation }
|