Skip to content

Commit 7217da7

Browse files
hemanandrclaude
andcommitted
fix: resolve 405 Method Not Allowed errors in user management API calls
- Fixed changeUserRole: changed PATCH to PUT to match backend endpoint - Fixed toggleUserStatus: changed PATCH to PUT to match backend endpoint - Backend uses HttpPut for both endpoints, frontend was using wrong methods - Now all user management operations should work without 405 errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ee62273 commit 7217da7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

thingconnect.pulse.client/src/api/services/user-management.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class UserManagementService {
7474
* Change user role
7575
*/
7676
static async changeUserRole(id: string, request: ChangeRoleRequest): Promise<UserInfo> {
77-
return apiClient.patch<UserInfo>(`/api/UserManagement/${encodeURIComponent(id)}/role`, request);
77+
return apiClient.put<UserInfo>(`/api/UserManagement/${encodeURIComponent(id)}/role`, request);
7878
}
7979

8080
/**
@@ -88,7 +88,7 @@ export class UserManagementService {
8888
* Toggle user active status
8989
*/
9090
static async toggleUserStatus(id: string, isActive: boolean): Promise<UserInfo> {
91-
return apiClient.patch<UserInfo>(`/api/UserManagement/${encodeURIComponent(id)}`, {
91+
return apiClient.put<UserInfo>(`/api/UserManagement/${encodeURIComponent(id)}`, {
9292
isActive,
9393
});
9494
}

0 commit comments

Comments
 (0)