[web] also return http_code when trying to create peering when already exists
This commit is contained in:
parent
1894a6dce9
commit
b3eb047a6f
2 changed files with 3 additions and 2 deletions
|
@ -159,7 +159,7 @@ class PeeringManager:
|
|||
# deny more than one peering per ASN to one node
|
||||
for peering in self.peerings["asn"][asn]:
|
||||
if peering["node"] == node:
|
||||
return False
|
||||
return False, 409
|
||||
|
||||
peering = {"MNT": mnt, "ASN": asn, "node": node, "wg_key": wg_key, "endpoint": endpoint,
|
||||
"ipv6ll": ipv6ll, "ipv4": ipv4, "ipv6": ipv6, "bgp_mp": bgp_mp, "bgp_enh": bgp_enh}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
Flask
|
||||
waitress
|
||||
pyopenssl
|
||||
pyopenssl
|
||||
requests
|
Loading…
Add table
Reference in a new issue