From e85762f7912eafaf3a0fc13133d52dc252f0f981 Mon Sep 17 00:00:00 2001 From: Patrick Schratz Date: Wed, 31 Jan 2024 18:38:39 +0100 Subject: [PATCH] Remove accidentally added file (#3304) See discussion in [`1ab94d6` (#3303)](https://github.com/woodpecker-ci/woodpecker/pull/3303/commits/1ab94d662b2d916714b2dfce903f14da2199dfe7#r1473078205) @qwerty287 --- server/api/queue.go | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 server/api/queue.go diff --git a/server/api/queue.go b/server/api/queue.go deleted file mode 100644 index 74d5f332d..000000000 --- a/server/api/queue.go +++ /dev/null @@ -1,21 +0,0 @@ -package api - -import ( - "encoding/json" - "log" - "net/http" - - "go.woodpecker-ci.org/woodpecker/v2/server/queue" // replace with the actual import path -) - -func GetQueueStats() { - http.HandleFunc("/api/queue/stats", func(w http.ResponseWriter, r *http.Request) { - var stats queue.InfoT - err := json.NewEncoder(w).Encode(stats) - if err != nil { - // handle the error - log.Printf("Error encoding JSON: %v", err) - return - } - }) -}