From 4e380473dfba13daba3229b1fd9706ca014b896d Mon Sep 17 00:00:00 2001 From: jzakotnik Date: Mon, 2 Aug 2021 22:41:11 +0200 Subject: [PATCH] implemented saving of data --- nextjs/mwe/pages/api/insertData.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nextjs/mwe/pages/api/insertData.js b/nextjs/mwe/pages/api/insertData.js index 178020c..be5e0c2 100644 --- a/nextjs/mwe/pages/api/insertData.js +++ b/nextjs/mwe/pages/api/insertData.js @@ -7,9 +7,11 @@ export default function handler(req, res) { console.log("Inserting data into DB"); console.log(req.body); console.log(req.body.authid); - console.log(req.body.defaultLunchProfile); + console.log(req.body.dayselection); + const authid = req.body.authid; - const lunchprofile = req.body.defaultLunchProfile; + const readerid = req.body.readerid; + const lunchprofile = req.body.dayselection; db.put( authid.admin,