1
0
Fork 0
forked from forgejo/forgejo

More refactoring of db.DefaultContext (#27083)

Next step of #27065
This commit is contained in:
JakobDev 2023-09-15 08:13:19 +02:00 committed by GitHub
parent f8a1094406
commit c548dde205
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 336 additions and 320 deletions

View file

@ -77,7 +77,7 @@ func DeleteAttachment(ctx *context.Context) {
ctx.Error(http.StatusForbidden)
return
}
err = repo_model.DeleteAttachment(attach, true)
err = repo_model.DeleteAttachment(ctx, attach, true)
if err != nil {
ctx.Error(http.StatusInternalServerError, fmt.Sprintf("DeleteAttachment: %v", err))
return
@ -122,7 +122,7 @@ func ServeAttachment(ctx *context.Context, uuid string) {
}
}
if err := attach.IncreaseDownloadCount(); err != nil {
if err := attach.IncreaseDownloadCount(ctx); err != nil {
ctx.ServerError("IncreaseDownloadCount", err)
return
}