summaryrefslogtreecommitdiff
path: root/internal/api/client/admin/domainblockcreate.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/admin/domainblockcreate.go')
-rw-r--r--internal/api/client/admin/domainblockcreate.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/api/client/admin/domainblockcreate.go b/internal/api/client/admin/domainblockcreate.go
index e1b6bb032..dd5623a1c 100644
--- a/internal/api/client/admin/domainblockcreate.go
+++ b/internal/api/client/admin/domainblockcreate.go
@@ -8,6 +8,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
+ "github.com/superseriousbusiness/gotosocial/internal/api"
"github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
)
@@ -110,6 +111,11 @@ func (m *Module) DomainBlocksPOSTHandler(c *gin.Context) {
return
}
+ if _, err := api.NegotiateAccept(c, api.JSONAcceptHeaders...); err != nil {
+ c.JSON(http.StatusNotAcceptable, gin.H{"error": err.Error()})
+ return
+ }
+
imp := false
importString := c.Query(ImportQueryKey)
if importString != "" {