Moved Rest controllers to 'api' package. Also removed annotation routes

This commit is contained in:
Deluan
2016-02-25 16:31:06 -05:00
parent 543e195744
commit 39757f884a
14 changed files with 20 additions and 143 deletions
+18
View File
@@ -0,0 +1,18 @@
package api
import (
"github.com/astaxie/beego"
"encoding/xml"
"github.com/deluan/gosonic/api/responses"
)
type PingController struct{ beego.Controller }
func (this *PingController) Get() {
response := responses.NewEmpty()
xmlBody, _ := xml.Marshal(response)
this.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
}