mirror of
https://github.com/dadosfera/maestro.git
synced 2026-08-31 19:58:21 +00:00
FIX: not deleting failed connection when it comes from request body
This commit is contained in:
@@ -89,13 +89,15 @@ export class ConnectionTestService {
|
||||
plugin,
|
||||
}),
|
||||
).catch(async (e) => {
|
||||
await this.connectionsService.deleteConnection({
|
||||
body: { id: connection_id },
|
||||
info: { customer_id, customer_name, user_id },
|
||||
});
|
||||
if (!body.connection_id) {
|
||||
await this.connectionsService.deleteConnection({
|
||||
body: { id: connection_id },
|
||||
info: { customer_id, customer_name, user_id },
|
||||
});
|
||||
}
|
||||
throw e;
|
||||
});
|
||||
if (!operation_result) {
|
||||
if (!operation_result && !body.connection_id) {
|
||||
await this.connectionsService.deleteConnection({
|
||||
body: { id: connection_id },
|
||||
info: { customer_id, customer_name, user_id },
|
||||
|
||||
Reference in New Issue
Block a user