get remote follows/accepts working

This commit is contained in:
tsmethurst 2021-05-19 22:07:27 +02:00
commit d69786ef17
16 changed files with 459 additions and 104 deletions

View file

@ -21,9 +21,14 @@ func (m *Module) AccountRelationshipsGETHandler(c *gin.Context) {
targetAccountIDs := c.QueryArray("id[]")
if len(targetAccountIDs) == 0 {
l.Debug("no account id specified in query")
c.JSON(http.StatusBadRequest, gin.H{"error": "no account id specified"})
return
// check fallback -- let's be generous and see if maybe it's just set as 'id'?
id := c.Query("id")
if id == "" {
l.Debug("no account id specified in query")
c.JSON(http.StatusBadRequest, gin.H{"error": "no account id specified"})
return
}
targetAccountIDs = append(targetAccountIDs, id)
}
relationships := []model.Relationship{}