mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Implement types[] param for notifications (#3009)
Counterpart of exclude_types[]. Also updates Swagger spec for types[] to use the correct param name and enumerate possible values. Fixes #3003
This commit is contained in:
@@ -80,11 +80,37 @@ import (
|
||||
// in: query
|
||||
// required: false
|
||||
// -
|
||||
// name: exclude_types
|
||||
// name: types[]
|
||||
// type: array
|
||||
// items:
|
||||
// type: string
|
||||
// description: Array of types of notifications to exclude (follow, favourite, reblog, mention, poll, follow_request)
|
||||
// enum:
|
||||
// - follow
|
||||
// - follow_request
|
||||
// - mention
|
||||
// - reblog
|
||||
// - favourite
|
||||
// - poll
|
||||
// - status
|
||||
// - admin.sign_up
|
||||
// description: Types of notifications to include. If not provided, all notification types will be included.
|
||||
// in: query
|
||||
// required: false
|
||||
// -
|
||||
// name: exclude_types[]
|
||||
// type: array
|
||||
// items:
|
||||
// type: string
|
||||
// enum:
|
||||
// - follow
|
||||
// - follow_request
|
||||
// - mention
|
||||
// - reblog
|
||||
// - favourite
|
||||
// - poll
|
||||
// - status
|
||||
// - admin.sign_up
|
||||
// description: Types of notifications to exclude.
|
||||
// in: query
|
||||
// required: false
|
||||
//
|
||||
@@ -145,6 +171,7 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
|
||||
c.Query(SinceIDKey),
|
||||
c.Query(MinIDKey),
|
||||
limit,
|
||||
c.QueryArray(IncludeTypesKey),
|
||||
c.QueryArray(ExcludeTypesKey),
|
||||
)
|
||||
if errWithCode != nil {
|
||||
|
Reference in New Issue
Block a user