mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
refactor(api): rename auth/whoami to users/info and simplify response
Rename endpoint from /auth/whoami to /users/info to align with ez-contract schema. Simplify WhoamiResponse by removing: - Realtime stats (requests, tokens, qps, rate_limited) - Key-specific fields (allow_ips, deny_ips, expires_at, model_limits, quota fields, usage stats) The endpoint now returns only essential identity information as defined in ez-contract/schemas/auth/auth.yaml. BREAKING CHANGE: /auth/whoami endpoint moved to /users/info with reduced response fields
This commit is contained in:
@@ -428,10 +428,10 @@ func main() {
|
||||
masterGroup.GET("/stats", masterHandler.GetSelfStats)
|
||||
}
|
||||
|
||||
// Auth Routes (public, no middleware - self-validates token)
|
||||
authGroup := r.Group("/auth")
|
||||
// Users Routes (public, no middleware - self-validates token)
|
||||
usersGroup := r.Group("/users")
|
||||
{
|
||||
authGroup.GET("/whoami", authHandler.Whoami)
|
||||
usersGroup.GET("/info", authHandler.Whoami)
|
||||
}
|
||||
|
||||
// Public/General Routes (if any)
|
||||
|
||||
Reference in New Issue
Block a user