权限控制

This commit is contained in:
2025-06-27 16:59:24 +08:00
parent 8b8b6b980a
commit cd3a0672bb
5 changed files with 744 additions and 30 deletions

View File

@@ -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;
}
}