feat(users): add user type modification functionality

- Add modifyType API endpoint in userApi
- Implement user type modification in Users.vue
This commit is contained in:
2026-03-30 14:22:12 +08:00
parent ba78f77243
commit 11245a5b7f
3 changed files with 13 additions and 3 deletions

View File

@@ -50,7 +50,10 @@ export const userApi = {
api.post('/userMgr/create', { username, passwd, type }),
removeUser: (targetUserID) =>
api.post('/userMgr/remove', { targetUserID }),
listUsers: () => api.get('/userMgr/list')
listUsers: () =>
api.get('/userMgr/list'),
modifyType: (userID, newType) =>
api.post(`/userMgr/modifyType`, { userID, newType: newType.toLowerCase() || 'visitor' })
};
export const sessionApi = {