feat: add lastfm route and workers

This commit is contained in:
axolotlmaid 2024-09-25 19:56:34 +01:00
parent 03d040a18d
commit 4fd340bf22
8 changed files with 128 additions and 1 deletions

View file

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