diff options
Diffstat (limited to 'internal/api/client/blocks/blocksget.go')
-rw-r--r-- | internal/api/client/blocks/blocksget.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/api/client/blocks/blocksget.go b/internal/api/client/blocks/blocksget.go index b00a6e198..d53feabfe 100644 --- a/internal/api/client/blocks/blocksget.go +++ b/internal/api/client/blocks/blocksget.go @@ -19,11 +19,13 @@ package blocks import ( - "github.com/sirupsen/logrus" "net/http" "strconv" + "github.com/sirupsen/logrus" + "github.com/gin-gonic/gin" + "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/oauth" ) @@ -94,6 +96,11 @@ func (m *Module) BlocksGETHandler(c *gin.Context) { return } + if _, err := api.NegotiateAccept(c, api.JSONAcceptHeaders...); err != nil { + c.JSON(http.StatusNotAcceptable, gin.H{"error": err.Error()}) + return + } + maxID := "" maxIDString := c.Query(MaxIDKey) if maxIDString != "" { |