Feat/controllers - refactor entire backend and new admin interface #75

Merged
KevinMidboe merged 117 commits from feat/controllers into master 2021-02-19 00:19:52 +00:00
Showing only changes of commit dcaaeae51f - Show all commits

View File

@@ -39,10 +39,13 @@ const getPrizesForWinnerById = (req, res) => {
return prizeDistribution
.verifyWinnerNextInLine(id)
.then(_ => lottery.allWines())
.then(wines =>
.then(winner => {
return prelotteryWineRepository.allWinesWithoutWinner().then(wines => [wines, winner]);
})
.then(([wines, winner]) =>
res.send({
wines: wines,
winner: winner,
message: "Wines to select from",
success: true
})