diff options
Diffstat (limited to 'internal/api/client/account/relationships.go')
-rw-r--r-- | internal/api/client/account/relationships.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/api/client/account/relationships.go b/internal/api/client/account/relationships.go index bb942d18a..22ae835f0 100644 --- a/internal/api/client/account/relationships.go +++ b/internal/api/client/account/relationships.go @@ -1,10 +1,12 @@ package account import ( - "github.com/sirupsen/logrus" "net/http" + "github.com/sirupsen/logrus" + "github.com/gin-gonic/gin" + "github.com/superseriousbusiness/gotosocial/internal/api" "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/oauth" ) @@ -57,6 +59,11 @@ func (m *Module) AccountRelationshipsGETHandler(c *gin.Context) { return } + if _, err := api.NegotiateAccept(c, api.JSONAcceptHeaders...); err != nil { + c.JSON(http.StatusNotAcceptable, gin.H{"error": err.Error()}) + return + } + targetAccountIDs := c.QueryArray("id[]") if len(targetAccountIDs) == 0 { // check fallback -- let's be generous and see if maybe it's just set as 'id'? |