2016-02-23 20:07:57 -09:00
|
|
|
package controllers
|
|
|
|
|
|
2016-02-23 20:29:27 -09:00
|
|
|
import (
|
|
|
|
|
"github.com/astaxie/beego"
|
|
|
|
|
"encoding/xml"
|
2016-02-24 11:29:19 -09:00
|
|
|
"github.com/deluan/gosonic/controllers/responses"
|
2016-02-23 20:29:27 -09:00
|
|
|
)
|
2016-02-23 20:07:57 -09:00
|
|
|
|
2016-02-23 20:29:27 -09:00
|
|
|
type PingController struct{ beego.Controller }
|
|
|
|
|
|
2016-02-23 20:07:57 -09:00
|
|
|
// @router /rest/ping.view [get]
|
|
|
|
|
func (this *PingController) Get() {
|
2016-02-24 08:00:55 -09:00
|
|
|
response := responses.NewEmpty()
|
2016-02-23 20:29:27 -09:00
|
|
|
xmlBody, _ := xml.Marshal(response)
|
|
|
|
|
this.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
|
2016-02-23 20:07:57 -09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|