{"size": 611, "ext": "js", "max_stars_repo_path": "API/routes/indexRouter.js", "max_stars_repo_name": "Taoufik-AJAANIT/Shops-Manager", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "API/routes/indexRouter.js", "max_issues_repo_name": "Taoufik-AJAANIT/Shops-Manager", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "API/routes/indexRouter.js", "max_forks_repo_name": "Taoufik-AJAANIT/Shops-Manager", "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": 22.6296296296, "max_line_length": 84, "alphanum_fraction": 0.7626841244}
const express = require('express')
const router = express.Router()
const indexController = require("../controllers/indexController")
const checkAuth = require("../middlwares/checkAuth")



// get all shops : 

router.get('/', checkAuth, indexController.fetchAllShops)


// like a shop & add it to preferredShops 

router.post('/', checkAuth, indexController.likeShope)

// fetch preferredShops

router.get('/prefered', checkAuth, indexController.fetchPrefferedShops)


// Remove from preferred shops

router.delete('/preferred/:shopId', checkAuth, indexController.removeFromPreffereds)


module.exports = router