novy prehled prirazovani IP apod.
This commit is contained in:
+13
-9
@@ -414,11 +414,13 @@ def get_app_ip_access_rules(app_id: str):
|
||||
|
||||
rows = con.execute(
|
||||
"""
|
||||
SELECT id, app_id, ip_cidr, methods, description,
|
||||
COALESCE(is_enabled, 1) AS is_enabled, created_at, updated_at
|
||||
FROM app_ip_access_rules
|
||||
WHERE app_id = ?
|
||||
ORDER BY id
|
||||
SELECT r.id, r.app_id, r.ip_cidr, r.methods, r.description,
|
||||
COALESCE(r.is_enabled, 1) AS is_enabled, r.created_at, r.updated_at,
|
||||
r.address_id, a.label AS address_label
|
||||
FROM app_ip_access_rules r
|
||||
LEFT JOIN ip_addresses a ON a.id = r.address_id
|
||||
WHERE r.app_id = ?
|
||||
ORDER BY r.id
|
||||
""",
|
||||
(app_id,),
|
||||
).fetchall()
|
||||
@@ -433,10 +435,12 @@ def get_app_ip_access_rule(rule_id: int, app_id: str):
|
||||
|
||||
row = con.execute(
|
||||
"""
|
||||
SELECT id, app_id, ip_cidr, methods, description,
|
||||
COALESCE(is_enabled, 1) AS is_enabled, created_at, updated_at
|
||||
FROM app_ip_access_rules
|
||||
WHERE id = ? AND app_id = ?
|
||||
SELECT r.id, r.app_id, r.ip_cidr, r.methods, r.description,
|
||||
COALESCE(r.is_enabled, 1) AS is_enabled, r.created_at, r.updated_at,
|
||||
r.address_id, a.label AS address_label
|
||||
FROM app_ip_access_rules r
|
||||
LEFT JOIN ip_addresses a ON a.id = r.address_id
|
||||
WHERE r.id = ? AND r.app_id = ?
|
||||
""",
|
||||
(rule_id, app_id),
|
||||
).fetchone()
|
||||
|
||||
Reference in New Issue
Block a user