feat: update authentication and profile management features
- Enhanced login response to include additional user information such as email, tier, and role. - Updated profile update logic to restrict access based on user roles and ensure only authorized users can modify profiles. - Replaced ProfilePage with AccountSettingsPage in routing and updated related components to reflect this change. - Added new API functions for updating profiles and changing passwords to improve user account management.
This commit is contained in:
1 parent
d9d2d9e506
commit
fae673670a
10 files changed
+283
-73
No files matched your search
@@ -13,7 +13,7 @@ import DesktopSidebar from './components/DesktopSidebar'
|
||||
import { getMainNavItems } from './config/appNav'
|
||||
import LoginPage from './pages/LoginPage'
|
||||
import Dashboard from './pages/Dashboard'
|
||||
import ProfilePage from './pages/ProfilePage'
|
||||
import AccountSettingsPage from './pages/AccountSettingsPage'
|
||||
import ExercisesListPage from './pages/ExercisesListPage'
|
||||
import ExerciseDetailPage from './pages/ExerciseDetailPage'
|
||||
import ExerciseFormPage from './pages/ExerciseFormPage'
|
||||
@@ -144,7 +144,8 @@ function AppRoutes() {
|
||||
|
||||
<Route element={<ProtectedLayout />}>
|
||||
<Route index element={<Dashboard />} />
|
||||
<Route path="profile" element={<ProfilePage />} />
|
||||
<Route path="profile" element={<Navigate to="/settings" replace />} />
|
||||
<Route path="settings" element={<AccountSettingsPage />} />
|
||||
<Route path="exercises">
|
||||
<Route index element={<ExercisesListPage />} />
|
||||
<Route path="new" element={<ExerciseFormPage />} />
|
||||
|
||||
Reference in new issue
Block a user