2016-02-25 16:31:06 -05:00
|
|
|
package api
|
2016-02-24 00:07:57 -05:00
|
|
|
|
2016-02-24 00:29:27 -05:00
|
|
|
import (
|
|
|
|
|
"encoding/xml"
|
2016-02-25 18:52:07 -05:00
|
|
|
"github.com/astaxie/beego"
|
2016-02-25 16:31:06 -05:00
|
|
|
"github.com/deluan/gosonic/api/responses"
|
2016-02-24 00:29:27 -05:00
|
|
|
)
|
2016-02-24 00:07:57 -05:00
|
|
|
|
2016-02-24 00:29:27 -05:00
|
|
|
type PingController struct{ beego.Controller }
|
|
|
|
|
|
2016-02-25 18:47:25 -05:00
|
|
|
func (c *PingController) Get() {
|
2016-02-24 12:00:55 -05:00
|
|
|
response := responses.NewEmpty()
|
2016-02-24 00:29:27 -05:00
|
|
|
xmlBody, _ := xml.Marshal(response)
|
2016-02-25 18:47:25 -05:00
|
|
|
c.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
|
2016-02-24 00:07:57 -05:00
|
|
|
}
|