From 23e080bc1544ff5cc46d94139caeaef612adadd1 Mon Sep 17 00:00:00 2001 From: Deluan Date: Sat, 11 Jan 2020 17:08:10 -0500 Subject: [PATCH] Remove stuttering --- api/api.go | 4 ++-- api/helpers.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/api.go b/api/api.go index da784310..d9d5b92b 100644 --- a/api/api.go +++ b/api/api.go @@ -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 diff --git a/api/helpers.go b/api/helpers.go index 1a0d96dc..8f5495f9 100644 --- a/api/helpers.go +++ b/api/helpers.go @@ -13,7 +13,7 @@ import ( ) func NewEmpty() *responses.Subsonic { - return &responses.Subsonic{Status: "ok", Version: ApiVersion} + return &responses.Subsonic{Status: "ok", Version: Version} } func RequiredParamString(r *http.Request, param string, msg string) (string, error) {