import updateNotification from "../controllers/notifications/updateNotification";
import { Request, Response } from "express";
import { requireAuth } from "../middleware/auth";

const notificationRouter = require("express").Router();
const getNotifications = require("../controllers/notifications/getNotifications");

notificationRouter.get(
  "/api/v1/notifications/user/:id",
  requireAuth,
  async (req: Request, res: Response) => {
    getNotifications(req, res);
  }
);

notificationRouter.put(
  "/api/v1/notifications/:id",
  requireAuth,
  async (req: Request, res: Response) => {
    updateNotification(req, res);
  }
);

module.exports = notificationRouter;
