mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Add HTTP header permission section to frontend (#2893)
* [feature] Add HTTP header filter section to frontend * tweak naming a bit
This commit is contained in:
@ -52,7 +52,7 @@ func (m *Module) getHeaderFilter(c *gin.Context, get func(context.Context, strin
|
||||
return
|
||||
}
|
||||
|
||||
filterID, errWithCode := apiutil.ParseID(c.Param("ID"))
|
||||
filterID, errWithCode := apiutil.ParseID(c.Param(apiutil.IDKey))
|
||||
if errWithCode != nil {
|
||||
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
|
||||
return
|
||||
@ -167,7 +167,7 @@ func (m *Module) deleteHeaderFilter(c *gin.Context, delete func(context.Context,
|
||||
return
|
||||
}
|
||||
|
||||
filterID, errWithCode := apiutil.ParseID(c.Param("ID"))
|
||||
filterID, errWithCode := apiutil.ParseID(c.Param(apiutil.IDKey))
|
||||
if errWithCode != nil {
|
||||
apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
|
||||
return
|
||||
|
@ -92,5 +92,5 @@ func (m *Module) HeaderFilterAllowDELETE(c *gin.Context) {
|
||||
// '500':
|
||||
// description: internal server error
|
||||
func (m *Module) HeaderFilterBlockDELETE(c *gin.Context) {
|
||||
m.deleteHeaderFilter(c, m.processor.Admin().DeleteAllowHeaderFilter)
|
||||
m.deleteHeaderFilter(c, m.processor.Admin().DeleteBlockHeaderFilter)
|
||||
}
|
||||
|
Reference in New Issue
Block a user