diff options
Diffstat (limited to 'internal/api/client/media/mediaupdate.go')
-rw-r--r-- | internal/api/client/media/mediaupdate.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/api/client/media/mediaupdate.go b/internal/api/client/media/mediaupdate.go index c22e4e919..97d1e6b6e 100644 --- a/internal/api/client/media/mediaupdate.go +++ b/internal/api/client/media/mediaupdate.go @@ -27,6 +27,7 @@ import ( "github.com/spf13/viper" "github.com/gin-gonic/gin" + "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/oauth" @@ -102,6 +103,11 @@ func (m *Module) MediaPUTHandler(c *gin.Context) { return } + if _, err := api.NegotiateAccept(c, api.JSONAcceptHeaders...); err != nil { + c.JSON(http.StatusNotAcceptable, gin.H{"error": err.Error()}) + return + } + attachmentID := c.Param(IDKey) if attachmentID == "" { c.JSON(http.StatusBadRequest, gin.H{"error": "no attachment ID given in request"}) |