summaryrefslogtreecommitdiffstats
path: root/models/notification.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-02-19 21:36:43 +0000
committerGitHub <noreply@github.com>2021-02-19 22:36:43 +0100
commitaa4f9180e4932a9813e898bf3bd9ac91924eeb03 (patch)
treee181203ffc52a8bb1740fdb81aeeeba5183c42bf /models/notification.go
parent39aa11f9c0d8aabd188f543d60752e0b8ff95cc5 (diff)
downloadgitea-aa4f9180e4932a9813e898bf3bd9ac91924eeb03.tar.gz
gitea-aa4f9180e4932a9813e898bf3bd9ac91924eeb03.zip
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>
Diffstat (limited to 'models/notification.go')
-rw-r--r--models/notification.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/notification.go b/models/notification.go
index 362b490994..32f3079bf4 100644
--- a/models/notification.go
+++ b/models/notification.go
@@ -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