remove deprecated mock admin endpoints

This commit is contained in:
2026-04-20 13:05:44 +08:00
parent ed642e8769
commit b3f112005e
13 changed files with 68 additions and 198 deletions

View File

@@ -308,26 +308,6 @@ func (h *UserHandler) GetUserAPIKeys(c *gin.Context) {
response.Paginated(c, out, total, page, pageSize)
}
// GetUserUsage handles getting user's usage statistics
// GET /api/v1/admin/users/:id/usage
func (h *UserHandler) GetUserUsage(c *gin.Context) {
userID, err := strconv.ParseInt(c.Param("id"), 10, 64)
if err != nil {
response.BadRequest(c, "Invalid user ID")
return
}
period := c.DefaultQuery("period", "month")
stats, err := h.adminService.GetUserUsageStats(c.Request.Context(), userID, period)
if err != nil {
response.ErrorFrom(c, err)
return
}
response.Success(c, stats)
}
// GetBalanceHistory handles getting user's balance/concurrency change history
// GET /api/v1/admin/users/:id/balance-history
// Query params: