fix delete connection POST request
This commit is contained in:
1 parent
27f2314c96
commit
5141bcdb0f
5 files changed
+28
-12
No files matched your search
@@ -776,16 +776,17 @@ function disconnectConnection(id) {
|
||||
}
|
||||
}
|
||||
|
||||
function deleteConnection(id) {
|
||||
async function deleteConnection(id) {
|
||||
if (!confirm('Delete this connection?')) return;
|
||||
|
||||
const conn = getConnection(id);
|
||||
if (conn && conn.socket) {
|
||||
conn.socket.close();
|
||||
if (!await deleteConnectionFromServer(id)) {
|
||||
alert('Failed to delete connection from server. Please try again.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (conn && conn.socket) conn.socket.close();
|
||||
connections = connections.filter(c => c.id !== id);
|
||||
deleteConnectionFromServer(id); // Delete from server storage
|
||||
autoSaveConnections();
|
||||
|
||||
if (currentConnectionId === id) {
|
||||
|
||||
Reference in new issue
Block a user