mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-04 15:43:16 -06:00
[bugfix] Log + ignore unknown notification types
This commit is contained in:
parent
61f8f1e0e3
commit
0bb8e51611
4 changed files with 93 additions and 55 deletions
|
|
@ -151,18 +151,6 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
types, errWithCode := apiutil.ParseNotificationTypes(c.QueryArray(TypesKey))
|
||||
if errWithCode != nil {
|
||||
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
|
||||
return
|
||||
}
|
||||
|
||||
exclTypes, errWithCode := apiutil.ParseNotificationTypes(c.QueryArray(ExcludeTypesKey))
|
||||
if errWithCode != nil {
|
||||
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
|
||||
return
|
||||
}
|
||||
|
||||
page, errWithCode := paging.ParseIDPage(c,
|
||||
1, // min limit
|
||||
80, // max limit
|
||||
|
|
@ -177,8 +165,8 @@ func (m *Module) NotificationsGETHandler(c *gin.Context) {
|
|||
c.Request.Context(),
|
||||
authed,
|
||||
page,
|
||||
types,
|
||||
exclTypes,
|
||||
apiutil.ParseNotificationTypes(c.QueryArray(TypesKey)), // Include types.
|
||||
apiutil.ParseNotificationTypes(c.QueryArray(ExcludeTypesKey)), // Exclude types.
|
||||
)
|
||||
if errWithCode != nil {
|
||||
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue