mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 00:58:30 +02:00
Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999)
Also removes some unnecessary uses of fmt.Sprintf and adds documentation strings Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
1 parent
39aa11f9c0
commit
aa4f9180e4
11 files changed
+53
-42
No files matched your search
@@ -6,7 +6,7 @@ package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path"
|
||||
"strconv"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
@@ -413,7 +413,7 @@ func (n *Notification) HTMLURL() string {
|
||||
|
||||
// APIURL formats a URL-string to the notification
|
||||
func (n *Notification) APIURL() string {
|
||||
return setting.AppURL + path.Join("api/v1/notifications/threads", fmt.Sprintf("%d", n.ID))
|
||||
return setting.AppURL + "api/v1/notifications/threads/" + strconv.FormatInt(n.ID, 10)
|
||||
}
|
||||
|
||||
// NotificationList contains a list of notifications
|
||||
|
||||
Reference in new issue
Block a user