权限控制
This commit is contained in:
@@ -112,3 +112,20 @@ export const userRegister = async (qq_code, password, token, captcha) => {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 管理员修改用户权限
|
||||
* @param {string} uuid - 用户uuid
|
||||
* @param {string} privilege - 新权限
|
||||
* @returns {Promise<void>} 无返回值,成功即为修改成功
|
||||
*/
|
||||
export const adminChangeUserPrivilege = async (uuid, privilege) => {
|
||||
try {
|
||||
await axiosInstance.put('/admin/change_user_privilege', {
|
||||
uuid,
|
||||
privilege
|
||||
});
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user