Refactored responses

This commit is contained in:
Deluan 2016-03-02 11:11:46 -05:00
parent 77e3aa7620
commit 01c68d6802
9 changed files with 64 additions and 69 deletions

View file

@ -30,7 +30,7 @@ func (c *GetIndexesController) Get() {
ifModifiedSince = "0"
}
res := &responses.ArtistIndex{}
res := responses.ArtistIndex{}
res.IgnoredArticles = beego.AppConfig.String("ignoredArticles")
res.LastModified, err = c.properties.DefaultGet(consts.LastScan, "-1")
@ -61,5 +61,7 @@ func (c *GetIndexesController) Get() {
}
c.Ctx.Output.Body(responses.NewXML(res))
response := responses.NewEmpty()
response.ArtistIndex = res
c.Ctx.Output.Body(responses.ToXML(response))
}