Skip to content
Snippets Groups Projects
Commit 06cf3e1f authored by gautewr's avatar gautewr
Browse files

...

parent d7770ee2
No related branches found
No related tags found
No related merge requests found
Pipeline #50063 failed
...@@ -2,7 +2,7 @@ const Dao = require("./dao.js"); ...@@ -2,7 +2,7 @@ const Dao = require("./dao.js");
module.exports = class PersonDao extends Dao { module.exports = class PersonDao extends Dao {
getAll(callback) { getAll(callback) {
super.query("select navn, alder, adresse from person", [], callback);; super.query("select navn, alder, adresse from person", [], callback);
} }
getOne(id, callback) { getOne(id, callback) {
...@@ -21,7 +21,7 @@ module.exports = class PersonDao extends Dao { ...@@ -21,7 +21,7 @@ module.exports = class PersonDao extends Dao {
delete(id, callback){ delete(id, callback){
super.query( super.query(
"DELETE FROM person WHERE id = ?", "DELETE FROM person WHERE id = 500",
[id], [id],
callback callback
); );
...@@ -30,7 +30,7 @@ module.exports = class PersonDao extends Dao { ...@@ -30,7 +30,7 @@ module.exports = class PersonDao extends Dao {
createOne(json, callback) { createOne(json, callback) {
var val = [json.navn, json.adresse, json.alder]; var val = [json.navn, json.adresse, json.alder];
super.query( super.query(
"insert into person (navn,adresse,alder) values (?,?,?)", "insert into person (navner,adresser,alderer) values (?,?,?)",
val, val,
callback, 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