feat: add /status route

This commit is contained in:
trafficlunar 2024-10-06 13:38:26 +01:00
parent 7a8a229f0e
commit aaa8640aaf
7 changed files with 122 additions and 3 deletions

View file

@ -0,0 +1,12 @@
package handler
import (
"backend/internal/worker"
"encoding/json"
"net/http"
)
func HandleGetStatus(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(worker.StatusData)
}