Refactor code

pull/131/head
wenxu12345 3 years ago
parent d80a669515
commit 59a5f675f6

@ -40,8 +40,8 @@ func RemoveBlackList(ownerUserID, blockUserID string) error {
if err != nil {
return err
}
black := db.Black{OwnerUserID: ownerUserID, BlockUserID: blockUserID}
return utils.Wrap(dbConn.Table("blacks").Delete(&black).Error, "RemoveBlackList failed")
err = dbConn.Table("blacks").Where("owner_user_id=? and block_user_id=?", ownerUserID, blockUserID).Delete(&db.GroupRequest{}).Error
return utils.Wrap(err, "RemoveBlackList failed")
}
func GetBlackListByUserID(ownerUserID string) ([]db.Black, error) {

Loading…
Cancel
Save