const express = require("express");
const authController = require("../../controllers/deliveryBoyControllers/authController");
const { protectDeliveryBoy } = require("../../middleware/auth");
const { optionalDeliveryBoyFile } = require("../../middleware/authMultipart");

const router = express.Router();

router.post("/register", optionalDeliveryBoyFile, authController.register);
router.post("/login", authController.login);
router.post("/forgot-password", authController.forgotPassword);
router.post("/reset-password", authController.resetPassword);
router.get("/me", protectDeliveryBoy, authController.getMe);
router.patch(
  "/me",
  protectDeliveryBoy,
  optionalDeliveryBoyFile,
  authController.updateMe
);
router.delete("/me", protectDeliveryBoy, authController.deleteMe);

module.exports = router;
