fix delete connection POST request

This commit is contained in:
dido committed 2026-09-24 08:39:26 +03:00
1 parent 27f2314c96
commit 5141bcdb0f
5 files changed
+28 -12

No files matched your search

+4
View File
@@ -208,8 +208,12 @@ class CredentialsManager:
"DELETE FROM connections WHERE id = ? AND username = ?",
(conn_id, username)
)
deleted = cursor.rowcount
conn.commit()
conn.close()
if deleted != 1:
logger.warning(f"Connection {conn_id} not found for user {username}")
return False
logger.info(f"Deleted connection {conn_id} for user {username}")
return True
except Exception as e: