Commit Graph

9 Commits

Author SHA1 Message Date
b0424a519c Fixed drawing winner count was +1.
On /lottery frontend page the count of winners that is sent to frontend
over socketIO started one index higher than it should.

This was from updating how winners are saved in the backend. Our winners
array now no longer needs to be incremented with 1 from the backend.
2021-02-20 13:57:39 +01:00
80e6c91045 API endpoint for getting latest lottery. 2021-02-20 13:29:41 +01:00
3f77722f4f allLotteries w/ sort & includeWinners query opts. 2021-02-18 23:42:21 +01:00
324ca5d9bc Date defaults to today and return response message. 2021-02-18 23:41:46 +01:00
f4a16bc417 Removed always setting isAdmin true. 2021-01-26 23:01:08 +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
4d822ccb64 Isolated lottery attendee functs to it's own file. 2021-01-24 11:10:49 +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