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 ab58a45da5 - Show all commits

View File

@@ -1,14 +1,15 @@
const path = require("path");
const prizeDistribution = require(path.join(__dirname, "../prizeDistribution"));
const winner = require(path.join(__dirname, "../winner"));
const prelotteryWineRepository = require(path.join(__dirname, "../prelotteryWine"));
const winnerRepository = require(path.join(__dirname, "../winner"));
const message = require(path.join(__dirname, "../message"));
const start = async (req, res) => {
const allWinners = await winners.allWinners();
const allWinners = await winnerRepository.allWinners();
if (allWinners.length === 0) {
return res.status(503).send({
message: "No winners left.",
message: "No winners found to distribute prizes to.",
success: false
});
}