diff options
author | 6543 <6543@obermui.de> | 2020-01-14 16:37:19 +0100 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2020-01-14 16:37:19 +0100 |
commit | 44de66bf50d1ab9a5acc298063cd942768092a19 (patch) | |
tree | fda1b76b954d720dfdfefded22883a51ab52e45e /routers/api/v1/swagger | |
parent | ce274d652f2be03364bc0d0a8cb1b4d1996b16c7 (diff) | |
download | gitea-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 'routers/api/v1/swagger')
-rw-r--r-- | routers/api/v1/swagger/notify.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/api/v1/swagger/notify.go b/routers/api/v1/swagger/notify.go index 7d45da0e12..cd30d496e0 100644 --- a/routers/api/v1/swagger/notify.go +++ b/routers/api/v1/swagger/notify.go @@ -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"` +} |