更改README.md

This commit is contained in:
2025-07-29 17:31:14 -07:00
parent 66a901c676
commit b965f90c97
8 changed files with 400 additions and 6 deletions

View File

@ -15,7 +15,14 @@ function App() {
<Routes>
<Route path="/login" element={<Login />} />
<Route path="/register" element={<Register />} />
<Route path="/oauth/authorize" element={<OAuthAuthorize />} />
<Route
path="/oauth/authorize"
element={
<PrivateRoute>
<OAuthAuthorize />
</PrivateRoute>
}
/>
<Route
path="/dashboard"
element={

View File

@ -28,7 +28,8 @@ export const AuthProvider = ({ children }) => {
const checkAuthStatus = async () => {
try {
const response = await axios.get('/api/auth/profile')
setUser(response.data.data)
setUser(response.data.data.user)
} catch (error) {
localStorage.removeItem('token')
delete axios.defaults.headers.common['Authorization']