mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-03-13 05:29:09 +01:00
Backend: Add force-unfollow action after ban
This commit is contained in:
parent
56d4c7410a
commit
deb574396e
1 changed files with 7 additions and 0 deletions
|
@ -84,6 +84,13 @@ func (rt *_router) PutBan(w http.ResponseWriter, r *http.Request, ps httprouter.
|
|||
return
|
||||
}
|
||||
|
||||
// Removes the banning user to the banned user's followers (if present)
|
||||
_, err = rt.db.UnfollowUser(banned, uid)
|
||||
|
||||
if err != nil {
|
||||
helpers.SendInternalError(err, "Database error: UnfollowUser", w, rt.baseLogger)
|
||||
}
|
||||
|
||||
helpers.SendStatus(http.StatusCreated, w, "Success", rt.baseLogger)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue