aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-03-13 20:31:41 +0900
committerGitHub <noreply@github.com>2023-03-13 11:31:41 +0000
commitd74a7efb60f94a4b8e6e5f65332f94f1be31b761 (patch)
treed59b2946cb8d957ef71c7ef5f7d8f59396c7b475 /routers
parentcdc9e91750036fc370db65a44618f3139db11ae1 (diff)
downloadgitea-d74a7efb60f94a4b8e6e5f65332f94f1be31b761.tar.gz
gitea-d74a7efb60f94a4b8e6e5f65332f94f1be31b761.zip
Use context for `RepositoryList.LoadAttributes` (#23435)
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/user/repo.go2
-rw-r--r--routers/web/user/notification.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go
index dcb14780a7..7a8978cc4e 100644
--- a/routers/api/v1/user/repo.go
+++ b/routers/api/v1/user/repo.go
@@ -31,7 +31,7 @@ func listUserRepos(ctx *context.APIContext, u *user_model.User, private bool) {
return
}
- if err := repos.LoadAttributes(); err != nil {
+ if err := repos.LoadAttributes(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, "RepositoryList.LoadAttributes", err)
return
}
diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go
index e96b3dd27a..e12b41e649 100644
--- a/routers/web/user/notification.go
+++ b/routers/web/user/notification.go
@@ -117,7 +117,7 @@ func getNotifications(ctx *context.Context) {
return
}
notifications = notifications.Without(failures)
- if err := repos.LoadAttributes(); err != nil { // TODO
+ if err := repos.LoadAttributes(ctx); err != nil {
ctx.ServerError("LoadAttributes", err)
return
}