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 with stages
in 2 minutes and 11 seconds
......@@ -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.
Finish editing this message first!
Please register or to comment