mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-03 08:54:37 -04: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:
parent
ce274d652f
commit
44de66bf50
9 changed files with 107 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue