From 543a7a6eb3aa300ebf89ae320898a85e5aa528ec Mon Sep 17 00:00:00 2001 From: Adrian Thompson Date: Sun, 30 Aug 2020 17:27:03 +0200 Subject: [PATCH] some cleanup and css fix for mobile --- api/request.js | 3 --- api/wineinfo.js | 2 +- src/components/RequestWine.vue | 22 ++++++++++++++++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/api/request.js b/api/request.js index d2aca2b..53511c9 100644 --- a/api/request.js +++ b/api/request.js @@ -22,7 +22,6 @@ router.route("/request").get(async (req, res) => { router.route("/request").post(async (req, res) => { const {wine} = req.body - console.log(wine) let thisWineIsLOKO = await Wine.findOne({id: wine.id}) @@ -37,12 +36,10 @@ router.route("/request").post(async (req, res) => { }); await thisWineIsLOKO.save() } - console.log(thisWineIsLOKO) let requestedWine = await RequestedWine.findOne({ "wineId": wine.id}) if(requestedWine == undefined){ - // console.log(localWine) requestedWine = new RequestedWine({ count: 1, wineId: wine.id, diff --git a/api/wineinfo.js b/api/wineinfo.js index d2cac75..a5d0497 100644 --- a/api/wineinfo.js +++ b/api/wineinfo.js @@ -27,7 +27,7 @@ const convertToOurWineObject = wine => { router.route("/wineinfo/search").get(async (req, res) => { const {query} = req.query - let url = new URL(`https://apis.vinmonopolet.no/products/v0/details-normal?productShortNameContains=test&maxResults=5`) + let url = new URL(`https://apis.vinmonopolet.no/products/v0/details-normal?productShortNameContains=test&maxResults=15`) url.searchParams.set('productShortNameContains', query) const vinmonopoletResponse = await fetch(url, { diff --git a/src/components/RequestWine.vue b/src/components/RequestWine.vue index edc217c..055e6c9 100644 --- a/src/components/RequestWine.vue +++ b/src/components/RequestWine.vue @@ -26,7 +26,7 @@
- + res.json()) - .then(console.log) } }, } @@ -155,6 +154,25 @@ input[type="text"] { width: 40%; margin-right: 1rem; } + @include mobile { + display: flex; + flex-direction: column; + .wine-image { + height: 100px; + width: 50px; + align-self: center; + } + .buttons{ + display: flex; + flex-direction: column; + align-self: center; + margin: 1em; + .wine-link{ + margin-top: 1em; + } + } + + } }