{"size": 559, "ext": "js", "max_stars_repo_path": "back-end/routes/index.js", "max_stars_repo_name": "MarkoMlakar/full-stack-development", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "back-end/routes/index.js", "max_issues_repo_name": "MarkoMlakar/full-stack-development", "max_issues_repo_issues_event_min_datetime": "2020-11-06T15:22:24.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-16T22:47:52.000Z", "max_forks_repo_path": "back-end/routes/index.js", "max_forks_repo_name": "MarkoMlakar/full-stack-development", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 27.95, "max_line_length": 70, "alphanum_fraction": 0.6457960644}
const express = require("express");
const { verify } = require("jsonwebtoken");
var router = express.Router();
const verifyToken = require("../middleware/tokenVerification");
const verifyRole = require("../middleware/userRoleVerification");
/* GET index page */
router.get("/", (req, res) => {
  res.json({ hello: "world" });
});

router.get("/admin", verifyToken, verifyRole("admin"), (req, res) => {
  res.json({ hello: "admin" });
});

router.get("/dashboard", verifyToken, (req, res) => {
  res.json({ hello: "auth user" });
});

module.exports = router;
