{"size": 2700, "ext": "js", "max_stars_repo_path": "src/routes/reads.js", "max_stars_repo_name": "Arnzero/myRoutines", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/routes/reads.js", "max_issues_repo_name": "Arnzero/myRoutines", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/routes/reads.js", "max_forks_repo_name": "Arnzero/myRoutines", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.275862069, "max_line_length": 69, "alphanum_fraction": 0.5607407407}
const express = require('express');
const router = express.Router();
const User = require('../models/User');


// READ login form
router.get('/login', async (req, res) => {
    try{
        //const users = await User.find();
        const user = "Hi Adrian!";

        res.render("../views/profile/login.ejs",{user})
    }catch(err){
        res.json({message:err})
    }
});

// READ profileEdit
router.get('/profileEdit', async (req, res) => {
    try{
        //const users = await User.find();
        const user = "Hi Adrian!";

        res.render("../views/profile/profileEdit.ejs",{user})
    }catch(err){
        res.json({message:err})
    }
});



// READ registerUserForm
router.get('/registerUser', async (req, res) => {
    try{
        //const users = await User.find();
        const user = "Hi Adrian!";

        res.render("../views/profile/registerUserForm.ejs",{user})
    }catch(err){
        res.json({message:err})
    }
});



// READ routineDaily
router.get('/', async (req, res) => {
    try{
        //const users = await User.find();
        const users = await "Adrian";
        res.render("../views/routines/routineDaily.ejs", {users});
    }catch(err){
        res.json({message:err})
    }
});

// READ routineSetup
router.get('/routineSetup', async (req, res) => {
    try{
       // const users = await User.find();
       const users = await "Adrian";
        res.render("../views/routines/routineSetup.ejs", {users});
    }catch(err){
        res.json({message:err})
    }
});

// READ routineWeek
router.get('/routineWeek', async (req, res) => {
    try{
       // const users = await User.find();
       const users = await "Adrian";
        res.render("../views/routines/routineWeek.ejs", {users});
    }catch(err){
        res.json({message:err})
    }
});

// READ routineWeekEdit
router.get('/routineWeekEdit', async (req, res) => {
    try{
       // const users = await User.find();
       const users = await "Adrian";
        res.render("../views/routines/routineWeekEdit.ejs", {users});
    }catch(err){
        res.json({message:err})
    }
});

// READ routineWeekSample
router.get('/routineSample', async (req, res) => {
    try{
        //const users = await User.find();
       
        const users = await "Adrian";
        res.render("../views/profile/routineWeekSample.ejs",{user})
    }catch(err){
        res.json({message:err})
    }
});


// READ ToDo List
router.get('/toDoList', async (req, res) => {
    try{
        //const users = await User.find();
        const users = await "Adrian";
        res.render("../views/routines/toDoList.ejs", {users});
    }catch(err){
        res.json({message:err})
    }
});



module.exports = router;