Commit Graph

176 Commits

Author SHA1 Message Date
f4be12d00b Added missing ) 😬 2020-09-23 23:22:39 +02:00
b0b99ed921 Fixed timeout for SMS response 1 min to 10 minutes
Error where timeout was set to a single minute. Forgot to update from testing. Now made timeout a bit more clear and added log message.
2020-09-18 15:56:11 +02:00
Adrian Thompson
2764972abd remove unused code and fix or check 2020-09-07 16:22:59 +02:00
Adrian Thompson
052b5007c2 add is admin middleware 2020-09-07 15:53:03 +02:00
Adrian Thompson
ea278a4892 remove console log 2020-09-07 14:50:40 +02:00
Adrian Thompson
4a98e79414 fix conflicts and rework routes 2020-09-07 14:49:24 +02:00
Adrian Thompson
6d26da1817 resolve first batch of comments 2020-09-07 13:15:10 +02:00
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
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
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
dde8fe1cbe Renamed app > router.js. VirtualLottery in router. 2020-09-06 14:07:18 +02:00
Adrian Thompson
ed6ac2ac01 move api call, remove delete requested wine button, rename emit 2020-09-04 15:42:03 +02:00
Adrian Thompson
a5ae46f5c3 working delete requested wine if admin 2020-09-01 10:17:17 +02:00
Adrian Thompson
dd9edf160e add endpoint for retrieving all requested wines 2020-08-31 12:15:22 +02:00
Adrian Thompson
543a7a6eb3 some cleanup and css fix for mobile 2020-08-30 17:27:03 +02:00
fd17e11e87 Register io to all req with app.set('socketio'). 2020-08-28 18:46:35 +02:00
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
Adrian Thompson
aea808dae1 🍷 2020-08-28 17:20:37 +02:00
Adrian Thompson
7b7895728b loko 2020-08-28 17:01:53 +02:00
Adrian Thompson
f785a111d8 cleanup 2020-08-27 16:50:04 +02:00
Adrian Thompson
15b84a9b18 add token and some styling 2020-08-27 15:15:43 +02:00
Adrian Thompson
09f0436f98 add search functionality 2020-08-27 13:25:44 +02:00
a6a84e4b29 Api files no longer return router, exports usable functions. 2020-08-27 00:31:01 +02:00
ec80aa8bcc All api routes & their respective functions. 2020-08-27 00:29:01 +02:00
368b6a29aa Renamed api/lotteries.js -> api/lottery.js 2020-05-30 10:25:37 +02:00
fa59d71717 Lottery endpoints for all, by-date or by-name.
Can now get all highscore entries grouped by shared highscore dates.
This gives a complete list of all the lotteries and their winners.
 - By-date takes a epoch date to match a given lottery.
 - By-name uses query parameter `name` for searching for all winnings by
name.
 - Both /by-date and /by-name don't just return the wine _id, but
resolves it's wine reference.
2020-05-30 10:24:56 +02:00
Kasper Rynning-Tønnesen
6e380c5f5c Timeouts are nice 2020-04-17 16:29:19 +02:00
Kasper Rynning-Tønnesen
7aa47b08ad Fix automatic choser issue 2020-04-17 15:50:22 +02:00
Kasper Rynning-Tønnesen
cab623b3f7 url 2020-04-06 09:52:36 +02:00
Kasper Rynning-Tønnesen
4051c04c91 token -> gatewayTokeng 2020-04-06 09:42:19 +02:00
Kasper Rynning-Tønnesen
39c4d8f134 Generalized some functions 2020-04-06 09:36:33 +02:00
Kasper Rynning-Tønnesen
096dbdb2e6 MOre sms, and automatic choser 2020-04-06 09:36:20 +02:00
Kasper Rynning-Tønnesen
e6582983f2 Cleaned up a bit 2020-04-06 09:26:05 +02:00
Kasper Rynning-Tønnesen
062b01f784 Only 10 min 2020-04-04 01:06:29 +02:00
Kasper Rynning-Tønnesen
40927ac286 Add sms capabilities, and online-fixing of everything 2020-04-04 01:05:52 +02:00
119d52828f Also take country and price when adding wine. 2020-03-26 16:31:37 +01:00
Kasper Rynning-Tønnesen
cd5612c9b9 Better saving 2020-03-26 16:18:34 +01:00
Kasper Rynning-Tønnesen
4060b7409e Added more data from winner 2020-03-26 16:08:24 +01:00
Kasper Rynning-Tønnesen
7dfb14fa0f Added link to dagens in notifcation 2020-03-17 14:44:05 +01:00
9db73c8c01 Console logs should be more clear what it represents. 2020-03-17 12:15:28 +01:00
Kasper Rynning-Tønnesen
71a9f99e45 Fixed redis error, and added link on click on notifications 2020-03-17 11:30:29 +01:00
cda945ead8 Messages from io gets saved to redis in message list. Endpoint for clearing, should be called when a lottery is ended. 2020-03-17 01:05:26 +01:00
c893d7d870 Added redis. Chat io msg to redis list. 2020-03-17 01:03:47 +01:00
7a12c929aa Moved generator to a component RaffleGenerator.
Moved generator and added to virtuallottertyregistrationpage
Removed logic for generating random colors in backend.
2020-03-16 19:56:01 +01:00
1dea04b0b2 If no winner is found for color it redraws 3 times
Redraws three times if no winner is found.
Grammatical fixes.
2020-03-16 19:34:12 +01:00
Kasper Rynning-Tønnesen
81eeabfe42 Shuffling? 2020-03-14 14:43:56 +01:00
Kasper Rynning-Tønnesen
f398db4e42 Splitting more, added chat, and fancier draw-animations 2020-03-14 14:04:07 +01:00
Kasper Rynning-Tønnesen
35e736a9d9 Add update-event for winners/attendees 2020-03-13 17:13:04 +01:00
Kasper Rynning-Tønnesen
bfbfa5a8bc Fixed so io is being sent in a better manner, and listening on the same port as the rest 2020-03-13 17:02:28 +01:00
Kasper Rynning-Tønnesen
b35dd5a971 Much virtual many lotteries 2020-03-13 16:37:08 +01:00