-
Notifications
You must be signed in to change notification settings - Fork 14
Fix changes for axum rewrite and refactor request handling #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the request handling system to work with a backend rewrite to Axum, introducing centralized API request functions and consolidating error handling patterns.
Key Changes:
- Removes the "secure-access-token" cookie mechanism, consolidating to a single "token" authentication approach
- Introduces new
baseApi.tswithgetRequest,postRequestWithResponse, andpostRequestWithoutResponsehelper functions - Migrates error enums from numeric to string values and consolidates generic error types into
GetRequestErrorandPostRequestError
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/api/baseApi.ts | New centralized API request handling with error standardization |
| src/types.ts | Consolidates and simplifies error enums, adds string values to most enums |
| src/utils/authUtils.ts | Removes secure-access-token deletion |
| src/api/usersApi.ts | Migrates most functions to use new baseApi helpers |
| src/api/leaderboardApi.ts | Fully migrated to use baseApi helpers |
| src/api/friendsApi.ts | Fully migrated to use baseApi helpers |
| src/components/leaderboard/actions.ts | Simplified using baseApi, fixes URL typo in deleteLeaderboard |
| src/components/friends/actions.ts | Simplified using baseApi with proper body formatting |
| src/components/LoginForm/actions.ts | Removes dual token fetch, uses single token approach |
| src/app/[locale]/register/actions.ts | Removes secure-access-token generation |
| src/app/[locale]/profile/actions.ts | Simplifies token and settings updates using baseApi |
| Various component files | Updates error handling to use new enum values and patterns |
| package-lock.json | Updates Next.js from 14.2.26 to 14.2.35 and other dependencies |
| .vscode/settings.json | Changes default formatter configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot are the used endpoints consistent with the ones that are introduced in this PR: Testaustime/testaustime-backend#115 |
|
@Eldemarkki I've opened a new pull request, #489, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 50 out of 51 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.