Kasper Rynning-Tønnesen
59b4366ed5
fix: Archive but save set winners as winners
...
If archiving a lottery, let archive-functionality circumvent SMS-service if the winners have been set on the archive page.
- Also remove unused file
2021-03-25 20:15:38 +01:00
80e6c91045
API endpoint for getting latest lottery.
2021-02-20 13:29:41 +01:00
2eb933f03e
Get including winners, filter by year and sort.
...
Separate function for getting all history including the winners object.
Both have sort parameter that is used within the mongo query instead of
doing it in javascript.
2021-02-18 23:30:09 +01:00
87257fd5b2
Moved everything not lottery out.
...
Moved all logic related to lotteryAttendees, lotteryWinners and
prelotteryWines into each their repository and controller.
Now only holds draw, archive and get archived lotteries.
2021-01-26 22:58:41 +01:00
f5d3b16f27
isAdmin default value = false.
2021-01-24 15:36:03 +01:00
b5b61784cc
Add winners manually by posting /lottery/winners.
2021-01-24 15:34:58 +01:00
53135acc05
Get/add/update/delete winners from lottery.
2021-01-24 14:01:36 +01:00
6d5f0e824f
Lottery wine functions & controller.
...
Split all wine/prelottrey wines into separate controller.
Now also have endpoints for deleting or updating single wine by id.
2021-01-24 12:12:52 +01:00
7aa5f7e9ce
Add, update and delete attendees to lottery.
2021-01-24 11:02:04 +01:00
18d8c2c7ca
Lottery, get/delete attendees.
...
Changed so get attendees no longer is done in two endpoints, now we use
req.isAuthenticated() to check if we want to return full or minimal json
data about each attendee.
2021-01-24 10:14:00 +01:00
89389ddc59
Renamed lottery -> history.
2021-01-15 19:16:15 +01:00
ad27ba8b33
Require statements now use path.join correctly.
2020-11-24 23:37:14 +01:00
82512fa4ba
Comments for readability.
2020-10-19 10:01:53 +02:00
56edf7e4d6
by-name endpoint sorts wins newest first.
2020-10-19 10:00:47 +02:00
98e04ecd63
Return object renamed from wins --> highscore.
2020-10-11 18:37:43 +02:00
139b80ccff
Merge branch 'master' into feat/history-page-by-date
2020-10-11 18:22:04 +02:00
feed7774ce
Merge branch 'master' into feat/personal-highscore
2020-10-11 18:18:44 +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
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
a6a84e4b29
Api files no longer return router, exports usable functions.
2020-08-27 00:31:01 +02:00
368b6a29aa
Renamed api/lotteries.js -> api/lottery.js
2020-05-30 10:25:37 +02:00