summaryrefslogtreecommitdiffstats
path: root/models/issue_comment.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-01-14 16:37:19 +0100
committerAntoine GIRARD <sapk@users.noreply.github.com>2020-01-14 16:37:19 +0100
commit44de66bf50d1ab9a5acc298063cd942768092a19 (patch)
treefda1b76b954d720dfdfefded22883a51ab52e45e /models/issue_comment.go
parentce274d652f2be03364bc0d0a8cb1b4d1996b16c7 (diff)
downloadgitea-44de66bf50d1ab9a5acc298063cd942768092a19.tar.gz
gitea-44de66bf50d1ab9a5acc298063cd942768092a19.zip
[API] add endpoint to check notifications [Extend #9488] (#9595)
* introduce GET /notifications/new * add TEST * use Sprintf instead of path.Join * Error more verbose * return number of notifications if unreaded exist * 200 http status for available notifications
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r--models/issue_comment.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go
index 8f54d9656a..699b8f0487 100644
--- a/models/issue_comment.go
+++ b/models/issue_comment.go
@@ -8,7 +8,6 @@ package models
import (
"fmt"
- "path"
"strings"
"code.gitea.io/gitea/modules/git"
@@ -249,7 +248,7 @@ func (c *Comment) APIURL() string {
return ""
}
- return c.Issue.Repo.APIURL() + "/" + path.Join("issues/comments", fmt.Sprint(c.ID))
+ return fmt.Sprintf("%s/issues/comments/%d", c.Issue.Repo.APIURL(), c.ID)
}
// IssueURL formats a URL-string to the issue