update typo in store and user pages#37
Conversation
Greptile SummaryThis PR fixes two fetch calls that were targeting
Confidence Score: 4/5Safe to merge — both pages were broken before this fix and the corrected endpoint exists and is properly secured. The endpoint changes are correct and align with the UserController mappings. The only remaining concern is that stores.html fetches all users from an endpoint whose name implies admin-only output, then silently relies on a client-side role filter; if that filter drifts, the owner selector would show all users. The client-side Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant StoresPage as stores.html (loadAdminUsers)
participant UsersPage as users.html (loadUsers)
participant API as UserController (GET /api/v1/users/admin)
Note over StoresPage,API: Before: GET /api/v1/users → no handler → 404/403
Note over UsersPage,API: Before: GET /api/v1/users → no handler → 404/403
Browser->>StoresPage: Open stores page
StoresPage->>API: GET /api/v1/users/admin
API-->>StoresPage: List of all UserDTOs
StoresPage->>StoresPage: "filter(role === ADMIN)"
StoresPage-->>Browser: Render admin user list
Browser->>UsersPage: Open users page
UsersPage->>API: GET /api/v1/users/admin
API-->>UsersPage: List of all UserDTOs
UsersPage-->>Browser: Render user management cards
|
No description provided.