1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

[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
This commit is contained in:
6543
2020-01-14 16:37:19 +01:00
committed by Antoine GIRARD
parent ce274d652f
commit 44de66bf50
9 changed files with 107 additions and 5 deletions

View File

@@ -21,3 +21,10 @@ type swaggerNotificationThreadList struct {
// in:body
Body []api.NotificationThread `json:"body"`
}
// Number of unread notifications
// swagger:response NotificationCount
type swaggerNotificationCount struct {
// in:body
Body api.NotificationCount `json:"body"`
}