Renamed receiver names

This commit is contained in:
Deluan 2016-02-25 18:47:25 -05:00
parent 39757f884a
commit a1829d432a
4 changed files with 12 additions and 12 deletions

View File

@ -7,9 +7,9 @@ import (
type GetLicenseController struct{ beego.Controller }
func (this *GetLicenseController) Get() {
func (c *GetLicenseController) Get() {
response := responses.NewXML(&responses.License{Valid: true})
this.Ctx.Output.Body(response)
c.Ctx.Output.Body(response)
}

View File

@ -8,7 +8,7 @@ import (
type GetMusicFoldersController struct{ beego.Controller }
func (this *GetMusicFoldersController) Get() {
func (c *GetMusicFoldersController) Get() {
repository := new(repositories.MediaFolderRepository)
mediaFolderList, _ := repository.GetAll()
folders := make([]responses.MusicFolder, len(mediaFolderList))
@ -18,7 +18,7 @@ func (this *GetMusicFoldersController) Get() {
}
musicFolders := &responses.MusicFolders{Folders: folders}
response := responses.NewXML(musicFolders)
this.Ctx.Output.Body(response)
c.Ctx.Output.Body(response)
}

View File

@ -8,10 +8,10 @@ import (
type PingController struct{ beego.Controller }
func (this *PingController) Get() {
func (c *PingController) Get() {
response := responses.NewEmpty()
xmlBody, _ := xml.Marshal(response)
this.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
c.Ctx.Output.Body([]byte(xml.Header + string(xmlBody)))
}

View File

@ -8,18 +8,18 @@ import (
type MainController struct{ beego.Controller }
func (this *MainController) Get() {
this.Ctx.Redirect(302, "/static/Jamstash/")
func (c *MainController) Get() {
c.Ctx.Redirect(302, "/static/Jamstash/")
}
func (this *MainController) Error404() {
func (c *MainController) Error404() {
if beego.BConfig.RunMode == beego.DEV || beego.BConfig.Log.AccessLogs {
r := this.Ctx.Request
r := c.Ctx.Request
devInfo := fmt.Sprintf(" | %-10s | %-40s | %-16s | %-10s |", r.Method, r.URL.Path, " ", "notmatch")
if beego.DefaultAccessLogFilter == nil || !beego.DefaultAccessLogFilter.Filter(this.Ctx) {
if beego.DefaultAccessLogFilter == nil || !beego.DefaultAccessLogFilter.Filter(c.Ctx) {
beego.Warn(devInfo)
}
}
this.CustomAbort(404, "Error 404")
c.CustomAbort(404, "Error 404")
}