Skip to content

Commit

Permalink
Delete old update patient info
Browse files Browse the repository at this point in the history
  • Loading branch information
ffracture committed Dec 18, 2023
1 parent 8b2b4f2 commit c6fb8d9
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions server/app/Controller/PatientController.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,6 @@ class PatientController {
}
}

// [PATCH] /patient/edit/:id
async editPatientInfo(req, res) {
const { name, age, address, phoneNumber, insuranceNumber, password } =
req.body;
const patientId = req.cookies.id;

try {
await db.query(
// `UPDATE patients SET name = ?, age = ?, address = ?, phoneNumber = ?, insuranceNumber = ?, password = ? WHERE id = ?`,
// [name, age, address, phoneNumber, insuranceNumber, password, patientId],
`UPDATE patients SET patients.name = '${name}', patients.age = '${age}', patients.address = '${address}', patients.phoneNumber = '${phoneNumber}', patients.insuranceNumber = '${insuranceNumber}', patients.password = '${password}' WHERE patients.pId = ${patientId}`,
(err) => {
if (err) throw err;
res.redirect("/patient/details/" + patientId);
}
);
} catch (error) {
console.log(error);
}
}

// [PATCH] /patient/updateInfo/:id
async updatePatientInfo(req, res) {
const patientId = req.params.id;
Expand Down

0 comments on commit c6fb8d9

Please sign in to comment.