Skip to content
Snippets Groups Projects
Commit 1b28bdb3 authored by Lars Sørlie's avatar Lars Sørlie
Browse files

Dying a little bit less

parent ee4476f9
No related branches found
No related tags found
No related merge requests found
Pipeline #22401 failed
......@@ -33,10 +33,10 @@ module.exports = class PersonDao extends Dao {
}
updateOne(id,data,callback){
let val = [json.navn, json.adresse, json.alder, json.id];
super.query(
"UPDATE PERSON SET navn = ?, adresse = ?, alder = ? WHERE id = ?",
data,
id,
"UPDATE Person SET (navn = ?, adresse = ?, alder = ?) WHERE id = ?",
val,
callback
);
}
......
......@@ -98,6 +98,6 @@ test("update one Person from db", done => {
done();
}//Hate
personDao.updateOne(1,{ navn: "Nils Nilsen", alder: 34, adresse: "Gata 3"},callback)
personDao.updateOne({ navn: "Nils Nilsen", alder: 34, adresse: "Gata 3", id: 1},callback)
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment