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

@ -812,7 +812,7 @@ func UploadFileToServer(ctx *context.Context) {
return
}
upload, err := repo_model.NewUpload(name, buf, file)
upload, err := repo_model.NewUpload(ctx, name, buf, file)
if err != nil {
ctx.Error(http.StatusInternalServerError, fmt.Sprintf("NewUpload: %v", err))
return
@ -832,7 +832,7 @@ func RemoveUploadFileFromServer(ctx *context.Context) {
return
}
if err := repo_model.DeleteUploadByUUID(form.File); err != nil {
if err := repo_model.DeleteUploadByUUID(ctx, form.File); err != nil {
ctx.Error(http.StatusInternalServerError, fmt.Sprintf("DeleteUploadByUUID: %v", err))
return
}