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