Add get request to preload endpoint for listing them

This commit is contained in:
Robert Resch
2025-12-10 23:30:08 +01:00
parent fbd5215669
commit 209b73a0f1
3 changed files with 47 additions and 6 deletions
+6
View File
@@ -133,6 +133,12 @@ func apiPreload(w http.ResponseWriter, r *http.Request) {
query := r.URL.Query()
src := query.Get("src")
// GET - return all preloads
if r.Method == "GET" {
api.ResponseJSON(w, GetPreloads())
return
}
// check if stream exists
stream := Get(src)
if stream == nil {