Skip to content

Commit

Permalink
Regenerate assets after removal of Initially methods in controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Kucherenko committed Feb 10, 2016
1 parent 8d7d66a commit a572b75
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ type tRequests struct {
// New allocates (github.com/colegion/contrib/controllers/requests).Requests controller,
// then returns it.
func (t tRequests) New(w http.ResponseWriter, r *http.Request, ctr, act string) *contr.Requests {
c := &contr.Requests{}
c := &contr.Requests{

Request: r,
}
return c
}

// Before is a dump method that always returns nil.
// Before calls (github.com/colegion/contrib/controllers/requests).Requests.Before.
func (t tRequests) Before(c *contr.Requests, w http.ResponseWriter, r *http.Request) http.Handler {

// Call magic Before action of (github.com/colegion/contrib/controllers/requests).Requests.
if res := c.Before(); res != nil {
return res
}

return nil
}

Expand All @@ -50,8 +58,7 @@ func (t tRequests) After(c *contr.Requests, w http.ResponseWriter, r *http.Reque
// of their execution phase.
func (t tRequests) Initially(c *contr.Requests, w http.ResponseWriter, r *http.Request, a []string) (finish bool) {

// Call magic Initially method of (github.com/colegion/contrib/controllers/requests).Requests.
return c.Initially(w, r, a)
return

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,21 @@ type tSessions struct {
// New allocates (github.com/colegion/contrib/controllers/sessions).Sessions controller,
// then returns it.
func (t tSessions) New(w http.ResponseWriter, r *http.Request, ctr, act string) *contr.Sessions {
c := &contr.Sessions{}
c := &contr.Sessions{

Request: r,
}
return c
}

// Before is a dump method that always returns nil.
// Before calls (github.com/colegion/contrib/controllers/sessions).Sessions.Before.
func (t tSessions) Before(c *contr.Sessions, w http.ResponseWriter, r *http.Request) http.Handler {

// Call magic Before action of (github.com/colegion/contrib/controllers/sessions).Sessions.
if res := c.Before(); res != nil {
return res
}

return nil
}

Expand All @@ -50,8 +58,7 @@ func (t tSessions) After(c *contr.Sessions, w http.ResponseWriter, r *http.Reque
// of their execution phase.
func (t tSessions) Initially(c *contr.Sessions, w http.ResponseWriter, r *http.Request, a []string) (finish bool) {

// Call magic Initially method of (github.com/colegion/contrib/controllers/sessions).Sessions.
return c.Initially(w, r, a)
return

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,23 @@ type tTemplates struct {
// New allocates (github.com/colegion/contrib/controllers/templates).Templates controller,
// then returns it.
func (t tTemplates) New(w http.ResponseWriter, r *http.Request, ctr, act string) *contr.Templates {
c := &contr.Templates{}
c := &contr.Templates{

Action: act,

Controller: ctr,
}
return c
}

// Before is a dump method that always returns nil.
// Before calls (github.com/colegion/contrib/controllers/templates).Templates.Before.
func (t tTemplates) Before(c *contr.Templates, w http.ResponseWriter, r *http.Request) http.Handler {

// Call magic Before action of (github.com/colegion/contrib/controllers/templates).Templates.
if res := c.Before(); res != nil {
return res
}

return nil
}

Expand All @@ -51,8 +61,7 @@ func (t tTemplates) After(c *contr.Templates, w http.ResponseWriter, r *http.Req
// of their execution phase.
func (t tTemplates) Initially(c *contr.Templates, w http.ResponseWriter, r *http.Request, a []string) (finish bool) {

// Call magic Initially method of (github.com/colegion/contrib/controllers/templates).Templates.
return c.Initially(w, r, a)
return

}

Expand Down

0 comments on commit a572b75

Please sign in to comment.