Kind of finished revamping add peers

Still need to clean some of the codes but overall is good :)
This commit is contained in:
Donald Zou
2024-05-12 00:39:17 +08:00
parent 57c2e89f00
commit 769ca4e26d
8 changed files with 243 additions and 131 deletions

View File

@@ -1240,7 +1240,7 @@ def add_peer(config_name):
return "Please fill in all required box."
if not isinstance(keys, list):
return config_name + " is not running."
if public_key in keys:
if public_key in keys:d;lp
return "Public key already exist."
check_dup_ip = g.cur.execute(
"SELECT COUNT(*) FROM " + config_name + " WHERE allowed_ip LIKE '" + allowed_ips + "/%'", ) \