feat: implement dynamic changelog loading from API
- Add GET /api/changelog endpoint to fetch changelog from CHANGELOG.md - Create service/changelog.go to parse CHANGELOG.md markdown file - Add handler/changelog.go to handle changelog requests - Update ChangelogDrawer component to fetch from API instead of hardcoded data - Export apiFetch from lib/api.ts for public use - Add changelog parser tests with 14 version entries verified
This commit is contained in:
@@ -46,6 +46,9 @@ func setupAPIRoutes(r *gin.Engine) {
|
||||
api.POST("/auth/login", handler.Login)
|
||||
api.GET("/auth/validate", handler.ValidateToken)
|
||||
|
||||
// 公开接口(无需登录)
|
||||
api.GET("/changelog", handler.GetChangelog)
|
||||
|
||||
// 需要登录的 API
|
||||
authed := api.Group("/")
|
||||
authed.Use(middleware.AuthRequired())
|
||||
|
||||
Reference in New Issue
Block a user