fix: omit Id in INSERT to prevent datatype mismatch
continuous-integration/webhook Client .exe publicado em produção (VPS4)

This commit is contained in:
VPS 4 Builder
2026-06-03 04:42:10 +02:00
parent 089c139f04
commit e9a4193c5c
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1181,8 +1181,8 @@ function connectToServer() {
if (data.action === 'create') {
const p = data.patient;
addLog(`👤 Criando paciente remoto: ${p.fullName}`);
const stmt = db.prepare('INSERT INTO Patients (Id, FirstName, LastName, Doctor, Remark) VALUES (?, ?, ?, ?, ?)');
stmt.run(p.id, p.firstName || '', p.lastName || '', p.doctor || '', p.remark || '');
const stmt = db.prepare('INSERT INTO Patients (FirstName, LastName, Doctor, Remark) VALUES (?, ?, ?, ?)');
stmt.run(p.firstName || '', p.lastName || '', p.doctor || '', p.remark || '');
addLog('✅ Paciente criado com sucesso localmente!');
} else if (data.action === 'update') {
const oldName = data.oldName;