Skip to content

Conversation

@Eldemarkki
Copy link
Member

@Eldemarkki Eldemarkki commented Dec 12, 2025

No description provided.

@vercel
Copy link

vercel bot commented Dec 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
testaustime Ready Ready Preview, Comment Dec 20, 2025 8:31pm
testaustime-storybook Ready Ready Preview, Comment Dec 20, 2025 8:31pm

Copy link

Copilot AI left a 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.ts with getRequest, postRequestWithResponse, and postRequestWithoutResponse helper functions
  • Migrates error enums from numeric to string values and consolidates generic error types into GetRequestError and PostRequestError

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.

@Eldemarkki
Copy link
Member Author

@copilot are the used endpoints consistent with the ones that are introduced in this PR: Testaustime/testaustime-backend#115

Copy link

Copilot AI commented Dec 13, 2025

@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.

Copy link

Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants