import { Router } from 'express' ; import { getProfile , login , signUp } from '../controllers/auth.controller' ; import { Validators } from '../../utils/validators' ; import { isAuthenticated } from '../middlewares/auth.middleware' ; import { controllerContainer } from '../../containers/controller.container' ; export const router = Router ( ) ; router . get ( '/' , ( req , res ) => { res . json ( 'Auth working!' ) ; } ) ; router . post ( '/register' , Validators . getSignUpValidators ( ) , controllerContainer ( signUp ) ) ; router . post ( '/login' , Validators . getLoginValidators ( ) , controllerContainer ( login ) ) ; router . get ( '/me' , isAuthenticated , getProfile ) ;