Register page now uses new /lottery, /lottery/wines and /lottery/winners
endpoints for sending information separatly. This allows lottery
(colors, bought total & stolen), lottery wines (prelottery wines) and
lottery winners (wine mapped to winner) sent. Before /lottery/winners &
/lottery was sent together to a single endpoint.
- 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.
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.
- An opaque gradient overlay on the top message. This creates the illusion
that there are more messages under that the user can scroll to.
- Changed the formatting of the chat messages.
- Repaired the scrolling that happens on load and when chatHistory prop
list updates. If a full page arrives we want to keep the position, but
on load and a single new message we want to jump to the bottom of the
list.
- Emitting loadMoreHistory expects a expanded list of chatHistory.
loadMoreHistory func uses new variables historyPage and historyPageSize
to fetch the next x = historyPageSize elements with skip, take query
parameters for /history endpoint before prepending the received messages
to the existing.
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.