Did a lot. Tested SSE & started on socket.io, should prob kill s.io replace w/ ws

This commit is contained in:
2021-11-26 20:05:42 +01:00
parent 2f88516326
commit b8a61d1a0e
25 changed files with 1200 additions and 47 deletions

View File

@@ -4,6 +4,7 @@ const prizeDistribution = require(path.join(__dirname, "../prizeDistribution"));
const prelotteryWineRepository = require(path.join(__dirname, "../prelotteryWine"));
const winnerRepository = require(path.join(__dirname, "../winner"));
const message = require(path.join(__dirname, "../message"));
const logger = require(`${__base}/logger`);
const start = async (req, res) => {
const allWinners = await winnerRepository.allWinners(true);
@@ -28,6 +29,7 @@ const start = async (req, res) => {
.catch(error => {
const { statusCode, message } = error;
logger.error(error)
return res.status(statusCode || 500).send({
message: message || "Unexpected error occured while starting prize distribution.",
success: false