mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-14 06:48:45 +00:00
Fix context usages (#35348)
This commit is contained in:
1 parent
da5ce5c8e7
commit
e837c998b7
48 files changed
+98
-100
No files matched your search
+2
-4
@@ -363,10 +363,8 @@ func (repo *Repository) FullName() string {
|
||||
|
||||
// HTMLURL returns the repository HTML URL
|
||||
func (repo *Repository) HTMLURL(ctxs ...context.Context) string {
|
||||
ctx := context.TODO()
|
||||
if len(ctxs) > 0 {
|
||||
ctx = ctxs[0]
|
||||
}
|
||||
// FIXME: this HTMLURL is still used in mail templates, so the "ctx" is not provided.
|
||||
ctx := util.OptionalArg(ctxs, context.TODO())
|
||||
return httplib.MakeAbsoluteURL(ctx, repo.Link())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user