Send Subsonic formatted response on marshalling errors
This commit is contained in:
@@ -61,6 +61,11 @@ type Subsonic struct {
|
||||
LyricsList *LyricsList `xml:"lyricsList,omitempty" json:"lyricsList,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
StatusOK = "ok"
|
||||
StatusFailed = "failed"
|
||||
)
|
||||
|
||||
type JsonWrapper struct {
|
||||
Subsonic Subsonic `json:"subsonic-response"`
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ var _ = Describe("Responses", func() {
|
||||
var response *Subsonic
|
||||
BeforeEach(func() {
|
||||
response = &Subsonic{
|
||||
Status: "ok",
|
||||
Status: StatusOK,
|
||||
Version: "1.8.0",
|
||||
Type: consts.AppName,
|
||||
ServerVersion: "v0.0.0",
|
||||
|
||||
Reference in New Issue
Block a user