refactor(management): rename GetUsage to GetUsageQueue and update routes/tests

- Renamed handler and test methods for better clarity on functionality.
- Updated route from `/v0/management/usage` to `/v0/management/usage-queue`.
- Adjusted integration and unit tests to reflect new naming and routes.
This commit is contained in:
Luis Pater
2026-05-05 03:02:25 +08:00
parent 61b39d49bd
commit da6c599efd
4 changed files with 19 additions and 11 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ func (r usageQueueRecord) MarshalJSON() ([]byte, error) {
return json.Marshal(string(r))
}
// GetUsage pops queued usage records from the Redis-compatible usage queue.
func (h *Handler) GetUsage(c *gin.Context) {
// GetUsageQueue pops queued usage records from the usage queue.
func (h *Handler) GetUsageQueue(c *gin.Context) {
if h == nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": "handler unavailable"})
return