Adjust for Blacklist
This commit is contained in:
@@ -178,6 +178,7 @@ func (o *PeerController) changeRelation(id string, dest *peer.Peer, user string,
|
||||
o.ServeJSON()
|
||||
return
|
||||
}
|
||||
rRelation := relation
|
||||
if !dest.Verify {
|
||||
switch relation {
|
||||
case peer.PARTNER:
|
||||
@@ -203,6 +204,11 @@ func (o *PeerController) changeRelation(id string, dest *peer.Peer, user string,
|
||||
Payload: b,
|
||||
})
|
||||
}
|
||||
if rRelation == peer.BLACKLIST {
|
||||
request.UpdateOne(map[string]interface{}{
|
||||
"relation": rRelation,
|
||||
}, dest.GetID())
|
||||
}
|
||||
o.Data["json"] = data
|
||||
o.ServeJSON()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user