You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
440 B

const uid = _req.getUID("uid");
const dbMedico = _db.form("medico")
.where(_db.where("uid").equal(uid))
.first();
if (!dbMedico) {
_header.status(404);
_out.json({ insertedData: 0, error: "medico não encontrado" });
_exec.stop();
}
const deletedData = _db.form("medico")
.where(_db.where("uid").equal(uid))
.delete(
"medico_especialidade",
"medico_convenio"
);
_out.json({deletedData})