import * as express from 'express' ; import { authGuard } from '../../../guards/auth-guard' ; import { roleGuard } from '../../../guards/role-guard' ; import { originGuard } from '../../../guards/origin-guard' ; import { UserController } from './user.controller' ; const router = express . Router ( ) ; router . post ( '/login' , UserController . login ) ; router . get ( '/fake-login/:usermail/:token' , originGuard , UserController . provideToken ) ; router . post ( '/sso' , UserController . singleSingnOn ) ; router . get ( '' , authGuard , UserController . getUsers ) ; router . get ( '/profile-img/:img' , authGuard , UserController . findProfileImg ) ; router . get ( '/refresh-token' , authGuard , UserController . refreshToken ) ; router . get ( '/is-admin/:id' , authGuard , UserController . getIsAdmin ) ; router . post ( '' , authGuard , UserController . create ) ; router . get ( '/:id' , authGuard , roleGuard , UserController . getUser ) ; router . put ( '/me/:id' , authGuard , UserController . update ) ; router . put ( '/management/:id' , authGuard , roleGuard , UserController . update ) ; router . delete ( '/:id' , authGuard , roleGuard , UserController . delete ) ; export default router ;