const express = require("express");
const adminRouter = express.Router();
const { adminController } = require("../controllers");
const handleToken = require("../models/handleToken/handlerToken");

adminRouter.post("/login", adminController.Newadminlogin);
adminRouter.get("/", adminController.getpassword);
adminRouter.post("/",  adminController.addAdmin);
adminRouter.put("/:id", handleToken, adminController.updateAdmin);
adminRouter.put("/changePassword/:id", handleToken, adminController.changePassword);

module.exports = adminRouter;
