mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-18 21:07:44 +03:00
Renamed receiver names
This commit is contained in:
parent
39757f884a
commit
a1829d432a
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)))
|
||||
}
|
||||
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user