qb-admin-fe/src/api/users.js

25 lines
588 B
JavaScript
Raw Normal View History

2019-02-23 21:40:26 +00:00
import request from '@/utils/request'
export async function fetchUsers(page = 1) {
2019-02-23 21:40:26 +00:00
return await request({
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'
})
}
export async function searchUsers(query, page = 1) {
2019-03-01 17:32:03 +00:00
return await request({
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 }