Skip to content
Snippets Groups Projects
Commit 8afead41 authored by Magomed Khatujevitsj Bakhmadov's avatar Magomed Khatujevitsj Bakhmadov
Browse files

Update persondao.js

parent 006d767c
No related branches found
No related tags found
No related merge requests found
Pipeline #22883 passed with warnings
......@@ -21,4 +21,22 @@ module.exports = class PersonDao extends Dao {
callback
);
}
updateOne(id, json, callback) {
var val = [json.navn, json.adresse, json.alder, id];
super.query(
"update person set navn = ?, adresse = ?, alder = ? where id = ?",
val,
callback
);
}
deleteOne(id, callback) {
super.query(
"delete from person where id = ?",
[id],
callback
);
}
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment