Files
navidrome/controllers/ping.go
2016-02-24 18:06:49 -05:00

21 lines
397 B
Go

package controllers
import (
"github.com/astaxie/beego"
"encoding/xml"
"github.com/deluan/gosonic/controllers/responses"
)
type PingController struct{ beego.Controller }
// @router /rest/ping.view [get]
func (this *PingController) Get() {
validate(this)
response := responses.NewEmpty()
xmlBody, _ := xml.Marshal(response)
this.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
}