load all things via middleware

This commit is contained in:
Brad Rydzewski
2016-04-12 13:08:17 -07:00
parent 42d6d8d3b2
commit 9b306a1bc8
25 changed files with 289 additions and 408 deletions

View File

@@ -14,7 +14,6 @@ import (
"github.com/drone/drone/engine/parser"
"github.com/drone/drone/model"
"github.com/drone/drone/remote"
"github.com/drone/drone/router/middleware/context"
"github.com/drone/drone/shared/httputil"
"github.com/drone/drone/shared/token"
"github.com/drone/drone/store"
@@ -205,7 +204,7 @@ func PostHook(c *gin.Context) {
// on status change notifications
last, _ := store.GetBuildLastBefore(c, repo, build.Branch, build.ID)
engine_ := context.Engine(c)
engine_ := engine.FromContext(c)
go engine_.Schedule(c.Copy(), &engine.Task{
User: user,
Repo: repo,