navidrome/server/public/handle_downloads.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
320 B
Go
Raw Normal View History

2023-03-11 02:46:13 +01:00
package public
import (
"net/http"
)
func (p *Router) handleDownloads(w http.ResponseWriter, r *http.Request) {
id := r.URL.Query().Get(":id")
if id == "" {
http.Error(w, "invalid id", http.StatusBadRequest)
return
}
err := p.archiver.ZipShare(r.Context(), id, w)
checkShareError(r.Context(), w, err, id)
}