* 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
|
@ -494,6 +494,23 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/notifications/new": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"notification"
|
||||
],
|
||||
"summary": "Check if unread notifications exist",
|
||||
"operationId": "notifyNewAvailable",
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/NotificationCount"
|
||||
},
|
||||
"204": {
|
||||
"description": "No unread notification"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/notifications/threads/{id}": {
|
||||
"get": {
|
||||
"consumes": [
|
||||
|
@ -10911,6 +10928,18 @@
|
|||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"NotificationCount": {
|
||||
"description": "NotificationCount number of unread notifications",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"new": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "New"
|
||||
}
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"NotificationSubject": {
|
||||
"description": "NotificationSubject contains the notification subject (Issue/Pull/Commit)",
|
||||
"type": "object",
|
||||
|
@ -12397,6 +12426,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"NotificationCount": {
|
||||
"description": "Number of unread notifications",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/NotificationCount"
|
||||
}
|
||||
},
|
||||
"NotificationThread": {
|
||||
"description": "NotificationThread",
|
||||
"schema": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue