refactor(api): fetchAllConfigs 接口从 GET 改为 POST

- 服务端: 新增 FetchAllRequest 结构体,参数通过 JSON body 传递
- 服务端: 路由从 api.GET 改为 api.POST
- Go/Python/Node.js/Java 客户端同步更新为 POST + JSON body
- 与 fetchChangedConfigs 接口风格统一,token 不再暴露在 URL 中
This commit is contained in:
2026-02-20 21:18:43 +08:00
parent b011b3a0b3
commit 08b2ba4c25
7 changed files with 88 additions and 37 deletions
+2 -2
View File
@@ -112,10 +112,10 @@ func main() {
user.POST("/logout", authHandler.Logout)
}
// client API routes (no JWT, uses authtoken or open access)
// client API routes (no JWT, uses token or open access)
api := r.Group("/api")
{
api.GET("/fetchAllConfigs", configApiHandler.FetchAllConfigs)
api.POST("/fetchAllConfigs", configApiHandler.FetchAllConfigs)
api.POST("/fetchChangedConfigs", configApiHandler.FetchChangedConfigs)
api.GET("/ping", configApiHandler.Ping)
}