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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user