200 Commits

Author SHA1 Message Date
56edf7e4d6 by-name endpoint sorts wins newest first. 2020-10-19 10:00:47 +02:00
KevinMidboe
0ad3d4cafd Merge branch 'master' of github.com:kevinmidboe/vinlottis 2020-10-11 22:35:21 +02:00
6603fc489c Send confirmation after select wine & text update.
Text update: sendWineConfirmation.
Confirmation on what wine recipient selected, date wone
and where to pick up the wine.
2020-10-11 22:34:50 +02:00
7e0d3cd75e Text update: sendLastWinnerMessage.
Specified where to pick up wone wine.
2020-10-11 22:29:37 +02:00
e76e814877 Always return success bool from getWinner endpoint 2020-10-11 22:21:02 +02:00
b3b5e87ab5 Log gateway response data. 2020-10-11 22:19:26 +02:00
439191008a More logging to console during draw. 2020-10-11 22:19:02 +02:00
795f110e1b Syntax error w/ capitalization crashes draw! 2020-10-11 22:18:41 +02:00
a50c94f77c Merge pull request #50 from KevinMidboe/fix/personal-highscore-page
Fix/personal highscore page
2020-10-11 18:49:18 +02:00
685db1f8f5 Revert "Feat vue router mode changed to history" 2020-10-11 18:46:20 +02:00
98e04ecd63 Return object renamed from wins --> highscore. 2020-10-11 18:37:43 +02:00
61fad22ef4 Merge pull request #48 from KevinMidboe/refactor/wine-ui
Refactor/implement new design for Wine
2020-10-11 18:27:37 +02:00
eaf3dbb586 Merge branch 'master' into refactor/ballot-becomes-raffle 2020-10-11 18:23:35 +02:00
139b80ccff Merge branch 'master' into feat/history-page-by-date 2020-10-11 18:22:04 +02:00
d68cd17ba1 Merge branch 'master' into feat/history-router 2020-10-11 18:20:22 +02:00
feed7774ce Merge branch 'master' into feat/personal-highscore 2020-10-11 18:18:44 +02:00
5f973b199d All wines endpoint returns newest first. 2020-10-11 15:55:17 +02:00
52dedd1e7c Renamed all references to ballot to raffle. 2020-10-11 15:43:24 +02:00
c0f26f9061 Refactored lottery controller. 2020-10-11 15:26:14 +02:00
0e74534cde Removed unnecessary mongo connection string. 2020-10-11 14:01:19 +02:00
0923965544 Removed hash from routes. 2020-10-11 13:56:19 +02:00
4c02c81cc3 Name also part of highscore/by-name resp. 2020-10-09 00:55:20 +02:00
0e8bf9546a Reverse highscore for newest first. 2020-10-09 00:52:06 +02:00
9b2de75910 Received and searched names are lowercased.
Endpoint /lottery/by-name now lowercases the path input name and the
search query towards mongo.
2020-10-09 00:51:34 +02:00
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