9 Commits

Author SHA1 Message Date
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
1b12453df0 LotteryWinner functionality not yet used.
Can post winners directly with parsing of parameters and error handling.
2021-02-18 23:38:00 +01:00
d0fa89b92b Update lottery winner by id.
Endpoint, controller and repository function for updating lottery winner
by id and json payload.
Keeps previous definition for undefined/null values.
2021-02-18 21:05:40 +01:00
939e7e34df All CRUDS on winners for current lottery. 2021-01-26 22:37:36 +01:00
afab4387cc Renamed winner.js to history.js. 2021-01-26 22:18:47 +01:00
1c1f52308f Add winner w/ wine to highscore. 2021-01-26 22:12:42 +01:00
e07e6ae09a Winner controller, winners by date, color or name.
Winner controller replaces a lot of what happens in retrieve did for
aggregating when and what had been won. Now this is more clearly defined
in winner.js.
Also leverage mongo's query more than sorting and aggregating data like
previous implementation where a lot happened in js.
2021-01-24 10:05:00 +01:00
e9ece6963e /by-color endpoint for sort all winners by color.
Can also include query parameter includeWines for resolved wine
references.
2021-01-17 17:26:37 +01:00
53780878af Renamed to winners. Winners gets controller setup.
Rewrote everything that happened in history to better take advantage of
monogdb instead of doing everything in js.

Our endpoints become:
 - /winners - getAll w/ includeWines and sort query params.
 - /winners/latest - latest winners grouped w/ includeWines query
 params.
 - /winners/by-date - all winners grouped by date w/ includeWines and
 sort.
 - /winners/by-date/:date - get winners per epoch or string date.
 - /winners/by-name/:name - get winner by name parameter w/ sort for
 wins direction.
2021-01-17 16:55:57 +01:00