{"size": 691, "ext": "js", "max_stars_repo_path": "routes/auth.js", "max_stars_repo_name": "nsharma1396/devcamper", "max_stars_repo_stars_event_min_datetime": "2020-04-05T20:07:56.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-03T05:42:56.000Z", "max_issues_repo_path": "routes/auth.js", "max_issues_repo_name": "nsharma1396/devcamper", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "routes/auth.js", "max_forks_repo_name": "nsharma1396/devcamper", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 46.0666666667, "max_line_length": 75, "alphanum_fraction": 0.7829232996}
const authRouter = require("kvell-scripts").router();
const authController = require("../controllers").auth;
const { protect } = require("../middlewares/auth");

authRouter.post("/register", authController.register);
authRouter.post("/login", authController.login);
authRouter.get("/logout", authController.logout);
authRouter.get("/me", protect, authController.getMe);
authRouter.put("/updatedetails", protect, authController.updateDetails);
authRouter.put("/updatepassword", protect, authController.updatePassword);
authRouter.post("/forgotpassword", authController.forgotPassword);
authRouter.put("/resetpassword/:resetToken", authController.resetPassword);

module.exports = authRouter;
