const eligibility = require('../../models/eligibility');
const helper = require('../../helper');
const express = require("express");
//const bodyParser = require("body-parser");
const router = express.Router();
const config = require("../../config")
//var jsonParser = bodyParser.json()
//var urlencodedParser = bodyParser.urlencoded({ extended: false })
const app = express();
app.use(express.json());

router.post("/eligibility", async (req, res, next) => {
     if(helper.check_headers(req) == "True"){
        var section1 = await  eligibility.get_eligibility()

        res.status(200).json({
            message: "Successfull",
            status: "True",
            data:{
                section1: section1
            }
        });
     }else{
        res.status(200).json({
            message: "Unauthorised request",
            status: "Fail"
        });
     }
});

module.exports = router;