mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
* 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
This commit is contained in:
@@ -7,7 +7,6 @@ package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
@@ -324,7 +323,7 @@ func (issue *Issue) GetIsRead(userID int64) error {
|
||||
|
||||
// APIURL returns the absolute APIURL to this issue.
|
||||
func (issue *Issue) APIURL() string {
|
||||
return issue.Repo.APIURL() + "/" + path.Join("issues", fmt.Sprint(issue.Index))
|
||||
return fmt.Sprintf("%s/issues/%d", issue.Repo.APIURL(), issue.Index)
|
||||
}
|
||||
|
||||
// HTMLURL returns the absolute URL to this issue.
|
||||
|
Reference in New Issue
Block a user