RaptusBackend / routers /RoundsRouter.js
GitHub Actions
Initial commit
df72131
const express = require('express');
const router = express.Router();
var bodyParser = require('body-parser')
router.use(bodyParser.json()); // to support JSON-encoded bodies
router.use(bodyParser.urlencoded({ // to support URL-encoded bodies
extended: true
}));
var cookies = require("cookie-parser");
router.use(cookies());
const round1 = require("../controllers/RoundOneController");
const round2 = require("../controllers/RoundTwoController");
const protect = require('../middlewares/ProtectRouter');
const { initialAssign } = require('../controllers/RoundInitialController');
const { roundThreeAssign } = require('../controllers/RoundThreeController');
const { roundFourAssign } = require('../controllers/RoundFourController');
const { getResponse } = require('../controllers/VerificationController');
router
.route("/first")
.get(round1.post)
.post(protect, round1.post)
router
.route("/second")
.get(protect, round2.roundTwoAssign)
//.post(protect, round2.post);
router
.route("/third")
.get(protect, roundThreeAssign)
router
.route("/fourth")
.get(protect, roundFourAssign)
module.exports = router;