mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-03 00:47:48 +01:00
Remove stuttering
This commit is contained in:
parent
8c1975b70f
commit
23e080bc15
2 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/go-chi/chi"
|
||||
)
|
||||
|
||||
const ApiVersion = "1.8.0"
|
||||
const Version = "1.8.0"
|
||||
|
||||
type SubsonicHandler = func(http.ResponseWriter, *http.Request) (*responses.Subsonic, error)
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ func addEndpoint(r chi.Router, path string, f SubsonicHandler) {
|
|||
}
|
||||
|
||||
func SendError(w http.ResponseWriter, r *http.Request, err error) {
|
||||
response := &responses.Subsonic{Version: ApiVersion, Status: "fail"}
|
||||
response := &responses.Subsonic{Version: Version, Status: "fail"}
|
||||
code := responses.ErrorGeneric
|
||||
if e, ok := err.(SubsonicError); ok {
|
||||
code = e.code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue