add artist search

This commit is contained in:
2025-02-06 00:35:38 +01:00
parent 2791b6de76
commit 6caefaffb2
2 changed files with 14 additions and 7 deletions

View File

@@ -283,13 +283,13 @@ func (s *Server) artistSearch(w http.ResponseWriter, r *http.Request) {
//TODO
limit, offset := pagination(r)
recent, err := getArtists(s.Db, q, limit, offset)
a, err := getArtists(s.Db, q, limit, offset)
if err != nil {
fmt.Println(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
writeJSON(w, recent, http.StatusOK)
writeJSON(w, a, http.StatusOK)
}
// @Summary Retrieves a song file by its encoded path