-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Chi to Gin web framework (#79)
### TL;DR Migrated the API from Chi to Gin framework and updated related components. ### What changed? - Replaced Chi router with Gin in `cmd/api.go` - Updated API handlers to use Gin context - Modified middleware to work with Gin - Adjusted `api.go` to use Gin-compatible error handlers - Updated `Meta` struct to use `uint64` for `ChainId` - Changed `GetChainId` function to return `*big.Int` - Removed `api.go` file from `internal/handlers` package ### How to test? 1. Run the API server 2. Test all existing endpoints to ensure they work with the new Gin implementation 3. Verify that authentication middleware still functions correctly 4. Check that error handling and responses are consistent with the previous implementation ### Why make this change? The migration to Gin framework offers several benefits: - Improved performance and efficiency - Better support for middleware and routing - Enhanced request handling and parameter parsing - Simplified error management and response formatting This change aims to streamline the API implementation and potentially improve overall application performance.
- Loading branch information
Showing
8 changed files
with
175 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.