diff --git a/README.md b/README.md index 196a6d3..22f0387 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
- [![Build Status](https://drone.kevinmidboe.com/api/badges/KevinMidboe/vinlottis/status.svg)](https://drone.kevinmidboe.com/KevinMidboe/vinlottis) + [![Build Status](https://drone.schleppe.cloud/api/badges/KevinMidboe/vinlottis/status.svg)](https://drone.schleppe.cloud/KevinMidboe/vinlottis)
diff --git a/api/lottery.js b/api/lottery.js index bdd9032..0f7d218 100644 --- a/api/lottery.js +++ b/api/lottery.js @@ -69,7 +69,7 @@ const all = (req, res) => { const latest = (req, res) => { return groupHighscoreByDate() - .then(lotteries => lotteries.shift()) + .then(lotteries => lotteries.shift()) // first element in list .then(latestLottery => resolveWineReferences(latestLottery, "winners")) .then(lottery => res.send({ message: "Latest lottery!", @@ -120,7 +120,7 @@ const byName = (req, res) => { .then(highscore => res.send({ message: `Lottery winnings for name: ${ name }.`, name: highscore.name, - highscore: highscore.wins + highscore: sortNewestFirst(highscore.wins) })) } diff --git a/api/request.js b/api/request.js index f7ac11c..210c3e0 100644 --- a/api/request.js +++ b/api/request.js @@ -20,20 +20,20 @@ const deleteRequestedWineById = async (req, res) => { return res.json({ message: `Slettet vin med id: ${id}`, success: true - }); + }); } const getAllRequestedWines = async (req, res) => { const allWines = await RequestedWine.find({}).populate("wine"); - + return res.json(allWines); } const requestNewWine = async (req, res) => { const {wine} = req.body - + let thisWineIsLOKO = await Wine.findOne({id: wine.id}) - + if(thisWineIsLOKO == undefined){ thisWineIsLOKO = new Wine({ name: wine.name, @@ -45,9 +45,9 @@ const requestNewWine = async (req, res) => { }); await thisWineIsLOKO.save() } - + let requestedWine = await RequestedWine.findOne({ "wineId": wine.id}) - + if(requestedWine == undefined){ requestedWine = new RequestedWine({ count: 1, @@ -58,7 +58,7 @@ const requestNewWine = async (req, res) => { requestedWine.count += 1; } await requestedWine.save() - + return res.send(requestedWine); } diff --git a/assets/fonts/vinlottis-icons/vinlottis-icons.eot b/assets/fonts/vinlottis-icons/vinlottis-icons.eot new file mode 100644 index 0000000..d5a3879 Binary files /dev/null and b/assets/fonts/vinlottis-icons/vinlottis-icons.eot differ diff --git a/assets/fonts/vinlottis-icons/vinlottis-icons.svg b/assets/fonts/vinlottis-icons/vinlottis-icons.svg new file mode 100644 index 0000000..3be4df8 --- /dev/null +++ b/assets/fonts/vinlottis-icons/vinlottis-icons.svg @@ -0,0 +1,99 @@ + + + +<<<<<<< HEAD +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +======= + + + +{ + "fontFamily": "icomoon", + "majorVersion": 1, + "minorVersion": 0, + "version": "Version 1.0", + "fontId": "icomoon", + "psName": "icomoon", + "subFamily": "Regular", + "fullName": "icomoon", + "description": "Font generated by IcoMoon." +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +>>>>>>> 627f96b4205143f053a77c3948f846e8864282b6 + \ No newline at end of file diff --git a/assets/fonts/vinlottis-icons/vinlottis-icons.ttf b/assets/fonts/vinlottis-icons/vinlottis-icons.ttf new file mode 100644 index 0000000..d9e5f2f Binary files /dev/null and b/assets/fonts/vinlottis-icons/vinlottis-icons.ttf differ diff --git a/assets/fonts/vinlottis-icons/vinlottis-icons.woff b/assets/fonts/vinlottis-icons/vinlottis-icons.woff new file mode 100644 index 0000000..cca62d7 Binary files /dev/null and b/assets/fonts/vinlottis-icons/vinlottis-icons.woff differ diff --git a/package.json b/package.json index d52ee67..5466d41 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,15 @@ "dev": "cross-env NODE_ENV=development webpack-dev-server", "start-dev": "cross-env NODE_ENV=development node server.js", "test": "echo \"Error: no test specified\" && exit 1" + "build": "cross-env NODE_ENV=production webpack --hide-modules" }, "author": "", "license": "ISC", "dependencies": { + "@babel/polyfill": "~7.2", + "@sentry/browser": "^5.27.4", + "@sentry/integrations": "^5.27.4", + "@sentry/tracing": "^5.27.4", "@zxing/library": "^0.15.2", "canvas-confetti": "^1.2.0", "chart.js": "^2.9.3", diff --git a/src/Vinlottis.vue b/src/Vinlottis.vue index 54830eb..38ce0d2 100644 --- a/src/Vinlottis.vue +++ b/src/Vinlottis.vue @@ -2,6 +2,7 @@
+