Supporting json output (except for errors)

This commit is contained in:
Deluan
2016-03-02 13:04:55 -05:00
parent 7c82af75f5
commit 9d41f5a39f
11 changed files with 114 additions and 99 deletions
+3 -1
View File
@@ -34,7 +34,9 @@ func mapControllers() {
func mapFilters() {
var ValidateRequest = func(ctx *context.Context) {
api.Validate(&beego.Controller{Ctx: ctx})
c := &api.BaseAPIController{}
c.Ctx = ctx
api.Validate(c)
}
beego.InsertFilter("/rest/*", beego.BeforeRouter, ValidateRequest)