mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 06:57:29 -06:00
get remote follows/accepts working
This commit is contained in:
parent
c7b4f847d8
commit
d69786ef17
16 changed files with 459 additions and 104 deletions
|
|
@ -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{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue