feat: 添加订单详情和退款功能,更新用户角色管理,增强超级管理员鉴权
This commit is contained in:
@@ -77,6 +77,11 @@ export const UserService = {
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
async updateUserRoles({ userID, roles }) {
|
||||
if (!userID) throw new Error('userID is required');
|
||||
if (!Array.isArray(roles) || roles.length === 0) throw new Error('roles is required');
|
||||
return requestJson(`/super/v1/users/${userID}/roles`, { method: 'PATCH', body: { roles } });
|
||||
},
|
||||
async getUserStatistics() {
|
||||
try {
|
||||
const data = await requestJson('/super/v1/users/statistics');
|
||||
|
||||
Reference in New Issue
Block a user