import express from 'express'
import { UserController } from '../controllers/user.controller';

const userRouter = express.Router()

userRouter.route('/login').post(
    (req, res)=>new UserController().login(req, res)
)

userRouter.route('/register').post(
    (req, res)=>new UserController().register(req, res)
)

userRouter.route("/addToFavourites").post(
    (req,res)=>new UserController().addToFavourites(req,res)
)

userRouter.route("/deleteFromFavourites").post(
    (req,res)=>new UserController().deleteFromFavourites(req,res)
)

userRouter.route("/updateFavourite").post(
    (req,res)=>new UserController().updateFavourite(req,res)
)

userRouter.route("/getUser/:user").get(
    (req,res)=>new UserController().getUser(req,res)
)

export default userRouter;