{"size": 739, "ext": "js", "max_stars_repo_path": "routes/thought-route.js", "max_stars_repo_name": "Elipticblock5/hw18mongo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "routes/thought-route.js", "max_issues_repo_name": "Elipticblock5/hw18mongo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "routes/thought-route.js", "max_forks_repo_name": "Elipticblock5/hw18mongo", "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": 19.4473684211, "max_line_length": 51, "alphanum_fraction": 0.6887686062}
const router = require("express").Router();

const {
    getAllTheThought,
    getThoughtById,
    createNewThought,
    updateUserThought,
    deleteUserThought,
    addUserReaction,
    removeUserReaction
} = require('../controllers/thought-controller');

router
    .route('/')
    .get(getAllTheThought)
    .post(createNewThought);

//by id
router
 .route('/:id')
 .get(getThoughtById)
 .put(updateUserThought)
.delete(deleteUserThought);

//routes for reaction

router
    .route("/:thoughtId/reactions")
    .post(addUserReaction);
router
    .route('/:thoughtId/reactions/:reactionId')
    .delete(removeUserReaction);

/*router.get("/",(req,res)=>{
    res.send("you are now using the thought route")
})*/

module.exports = router