mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Make modules/context.Context a context.Context (#16031)
* Make modules/context.Context a context.Context Signed-off-by: Andrew Thornton <art27@cantab.net> * Simplify context calls Signed-off-by: Andrew Thornton <art27@cantab.net> * Set the base context for requests to the HammerContext Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -35,7 +35,7 @@ func FlushQueues(ctx *context.PrivateContext) {
|
||||
})
|
||||
return
|
||||
}
|
||||
err := queue.GetManager().FlushAll(ctx.Req.Context(), opts.Timeout)
|
||||
err := queue.GetManager().FlushAll(ctx, opts.Timeout)
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusRequestTimeout, map[string]interface{}{
|
||||
"err": fmt.Sprintf("%v", err),
|
||||
|
@ -36,7 +36,7 @@ func RestoreRepo(ctx *myCtx.PrivateContext) {
|
||||
}
|
||||
|
||||
if err := migrations.RestoreRepository(
|
||||
ctx.Req.Context(),
|
||||
ctx,
|
||||
params.RepoDir,
|
||||
params.OwnerName,
|
||||
params.RepoName,
|
||||
|
Reference in New Issue
Block a user