From 83a60dc19b0f9304ea2e25449e616df88e863c86 Mon Sep 17 00:00:00 2001
From: hermanrm <hermanrm@stud.ntnu.no>
Date: Mon, 24 Sep 2018 20:50:42 +0200
Subject: [PATCH] =?UTF-8?q?La=20til=20metode=20for=20=C3=A5=20oppdatere=20?=
 =?UTF-8?q?en=20person?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 dao/persondao.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dao/persondao.js b/dao/persondao.js
index 987542b..4844765 100644
--- a/dao/persondao.js
+++ b/dao/persondao.js
@@ -21,4 +21,13 @@ module.exports = class PersonDao extends Dao {
       callback
     );
   }
+
+  updateOne(json, callback) {
+    var val = [json.navn, json.adresse, json.alder, json.id];
+    super.query(
+        "update person set navn=?, adresse=?, alder=?, where id=?",
+        val,
+        callback
+    );
+  }
 };
-- 
GitLab