2016-02-25 12:31:06 -09:00
|
|
|
package api
|
2016-02-23 20:07:57 -09:00
|
|
|
|
2016-02-23 20:29:27 -09:00
|
|
|
import (
|
|
|
|
|
"encoding/xml"
|
2016-02-25 14:52:07 -09:00
|
|
|
"github.com/astaxie/beego"
|
2016-02-25 12:31:06 -09:00
|
|
|
"github.com/deluan/gosonic/api/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-25 14:47:25 -09:00
|
|
|
func (c *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)
|
2016-02-25 14:47:25 -09:00
|
|
|
c.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
|
2016-02-23 20:07:57 -09:00
|
|
|
}
|