mirror of
https://github.com/trafficlunar/api.git
synced 2026-06-27 22:24:08 +00:00
feat: add lastfm route and workers
This commit is contained in:
parent
03d040a18d
commit
4fd340bf22
8 changed files with 128 additions and 1 deletions
12
internal/handler/lastfm.go
Normal file
12
internal/handler/lastfm.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue