feat: CRUD remoto ACKs
continuous-integration/webhook Falha no build do client (VPS4)

This commit is contained in:
VPS 4 Builder
2026-06-02 20:52:28 +02:00
parent ac1fb025fc
commit 3392a1090a
3 changed files with 10 additions and 3 deletions
+7
View File
@@ -1175,6 +1175,7 @@ function connectToServer() {
const db = getLocalDb();
if (!db) {
addLog('❌ Falha ao acessar banco de dados local para CRUD.');
if (data.eventId) socket.emit('remote-crud-ack', { eventId: data.eventId, pcName: config.clientName, success: false, error: 'Falha banco local' });
return;
}
if (data.action === 'create') {
@@ -1197,8 +1198,14 @@ function connectToServer() {
stmt.run(pName);
addLog('✅ Paciente excluído com sucesso localmente!');
}
if (data.eventId) {
socket.emit('remote-crud-ack', { eventId: data.eventId, pcName: config.clientName, success: true });
}
} catch (e) {
addLog(`❌ Erro no CRUD remoto: ${e.message}`);
if (data.eventId) {
socket.emit('remote-crud-ack', { eventId: data.eventId, pcName: config.clientName, success: false, error: e.message });
}
}
});
}