Refactor/route separation #21

Merged
KevinMidboe merged 26 commits from refactor/routeSeparation into master 2020-09-06 14:00:12 +00:00

26 Commits

Author SHA1 Message Date
KevinMidboe 20dd638133 Resovled merge conflict in yarn.lock. 2020-09-06 15:58:17 +02:00
KevinMidboe f6c1e35180 Removed deprecated package: requests. 2020-09-06 15:56:09 +02:00
KevinMidboe bf0670c285 Reflect backend changes. Winners nested in lottery. 2020-09-06 15:20:11 +02:00
KevinMidboe 7e08e2d628 Finer control when updating lottery.
Lottery update now has endpoint/functions for also submitting winners,
wines and lottery (what's bought) separatly.
2020-09-06 15:17:56 +02:00
KevinMidboe 4b926c9ece Forward /winner/:id to frontend endpoint. (w/ hash) 2020-09-06 15:17:16 +02:00
KevinMidboe a7f4f9af27 Utils file. Includes date format function. 2020-09-06 14:42:27 +02:00
KevinMidboe ec1685dfa8 Adding attendee shows toast not alert.
Also better feedback when no colors are defined or name/phone number
missing.
2020-09-06 14:41:04 +02:00
KevinMidboe f171853c22 Register wines, lottery and winners separatly.
Register page now uses new /lottery, /lottery/wines and /lottery/winners
endpoints for sending information separatly. This allows lottery
(colors, bought total & stolen), lottery wines (prelottery wines) and
lottery winners (wine mapped to winner) sent. Before /lottery/winners &
/lottery was sent together to a single endpoint.
2020-09-06 14:34:43 +02:00
KevinMidboe c1f0a1b7f3 Padding for air around elements. 2020-09-06 14:33:45 +02:00
KevinMidboe 55b3552786 Flex wrap winner raffles to not overflow vertical. 2020-09-06 14:32:29 +02:00
KevinMidboe 4f9b4ad3cf Some margin between button and text. 2020-09-06 14:29:30 +02:00
KevinMidboe ef035d3c44 Set line-height for vin-button same as font-size. 2020-09-06 14:22:01 +02:00
KevinMidboe 7684fde8e5 global rule for flex column. 2020-09-06 14:21:45 +02:00
KevinMidboe 6dc4c9080e Reflecting changes from renaming backend routes. 2020-09-06 14:21:10 +02:00
KevinMidboe 8268efe625 Include positioning stylesheet in root Vue comp. 2020-09-06 14:20:37 +02:00
KevinMidboe a30dc2a419 Renamed & moved frontend router. 2020-09-06 14:20:01 +02:00
KevinMidboe 1d714d1e5a Removed router, refactored virtual functoinality.
- Removed the router from virtualRegistration so router.js handles routing
and virtualRegistration only exports functions.
- Refactored what code is in each of the virtual(Lottery/Registration)
files. /finish in Lottery now only sends update to all winners and
delegates sending to next winner in line, and setting timeout to
virtualRegistration.
- Better error handling and all responses from virtualRegistration has
message in json response.
2020-09-06 14:14:26 +02:00
KevinMidboe 4f054a0437 Message uses node's https insteadof requests.
Messages re-written to use nodes built in https over external requests
package.
Also updated message functions to always return promises and have
clearer names for what their purpose is.
2020-09-06 14:13:36 +02:00
KevinMidboe dde8fe1cbe Renamed app > router.js. VirtualLottery in router. 2020-09-06 14:07:18 +02:00
KevinMidboe fd17e11e87 Register io to all req with app.set('socketio'). 2020-08-28 18:46:35 +02:00
KevinMidboe 51a7107802 Endpoints defined and exported as functions.
Changed all routes to functions and export them to app.js to handle the
registration of route using the functions exported from this file.
2020-08-28 18:45:33 +02:00
KevinMidboe 3256c62a39 Merge pull request #20 from KevinMidboe/dependabot/npm_and_yarn/elliptic-6.5.3
Bump elliptic from 6.5.2 to 6.5.3
2020-08-27 00:52:10 +02:00
KevinMidboe a6a84e4b29 Api files no longer return router, exports usable functions. 2020-08-27 00:31:01 +02:00
KevinMidboe ec80aa8bcc All api routes & their respective functions. 2020-08-27 00:29:01 +02:00
KevinMidboe 262efa0380 All api endpoints are moved to apiRouter. 2020-08-27 00:28:35 +02:00
dependabot[bot] 8431e52e0a Bump elliptic from 6.5.2 to 6.5.3
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-01 11:01:41 +00:00