mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-27 12:29:50 +01:00
Refactored responses
This commit is contained in:
parent
77e3aa7620
commit
01c68d6802
9 changed files with 64 additions and 69 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/deluan/gosonic/api/responses"
|
||||
)
|
||||
|
|
@ -9,7 +8,5 @@ import (
|
|||
type PingController struct{ beego.Controller }
|
||||
|
||||
func (c *PingController) Get() {
|
||||
response := responses.NewEmpty()
|
||||
xmlBody, _ := xml.Marshal(response)
|
||||
c.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
|
||||
c.Ctx.Output.Body(responses.ToXML(responses.NewEmpty()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue