Package com.futbol.manager.controller
Class UserController
java.lang.Object
com.futbol.manager.controller.GlobalCorsConfigController
com.futbol.manager.controller.UserController
@RestController
@RequestMapping("/rest/user")
public class UserController
extends GlobalCorsConfigController
Controlador para el usuario
- Author:
- Alejandro
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>changePassByEmail(String mail) Metodo para cambiar el pass del usuario por Emailorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>createUpdateImgUser(org.springframework.web.multipart.MultipartFile[] files, String userId) metodo para actualizar la img del usuarioorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>createUpdateUser(com.futbol.manager.dto.UserCreateUpdateDTO userDto) Metodo para crear o actualizar un usuario por idUserorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>deleteCoach(String teamId, String userId) Metodo para eliminar a un entrenador de un equipoorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>filterClub(String filter) METODO PARA FILTRAR LOS CLUBESorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>METODO PARA OBTENER TODOS LOS CLUBESorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>getUserById(int userId) METODO PARA OBTENER EL OBJETO USER POR IDorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>getUserListByTeam(String teamId) metodo para obtener los entrenadores de un equipoorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>inviteCoach(String mail, String teamId, int userId) Metodo para invitar a un entrenador a un equipoorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>invitePlayer(String mail, String playerId, String isMenor, String teamId) metodo para invitar a un jugadororg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>updatePassUser(com.futbol.manager.dto.ChangePassDTO changePass) Metodo para actualizar la contraseña de un usuario por idUserorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>validateMail(String mail) metodo para validar si el usuario ya esta registradoorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>validateUser(int userId) Metodo para validar un usuario por idUserorg.springframework.http.ResponseEntity<com.futbol.manager.response.Response>validationUserByEmail(com.futbol.manager.dto.UserCreateUpdateDTO userR) Metodo para validar el usuario por Email
-
Constructor Details
-
UserController
public UserController()
-
-
Method Details
-
createUpdateUser
@PostMapping("createupdateuser") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> createUpdateUser(@RequestBody com.futbol.manager.dto.UserCreateUpdateDTO userDto) Metodo para crear o actualizar un usuario por idUser- Parameters:
userDto- es el objeto usuario- Returns:
- el objeto response el objeto response
-
updatePassUser
@PostMapping("updatePassUser") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> updatePassUser(@RequestBody com.futbol.manager.dto.ChangePassDTO changePass) Metodo para actualizar la contraseña de un usuario por idUser- Parameters:
changePass-- Returns:
- el objeto response
-
validateUser
@PostMapping("validateUser") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> validateUser(@RequestBody int userId) Metodo para validar un usuario por idUser- Parameters:
userId-- Returns:
- el objeto response
-
getUserById
@GetMapping("getuserbyid/{userId}") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> getUserById(@PathVariable int userId) METODO PARA OBTENER EL OBJETO USER POR ID- Parameters:
userId-- Returns:
- el objeto response
-
validateMail
@PostMapping("validateMail") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> validateMail(@RequestBody String mail) metodo para validar si el usuario ya esta registrado- Parameters:
mail-- Returns:
- el objeto response
-
validationUserByEmail
@PostMapping("/validationUser") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> validationUserByEmail(@RequestBody com.futbol.manager.dto.UserCreateUpdateDTO userR) Metodo para validar el usuario por Email- Parameters:
userR-- Returns:
- el objeto response
-
changePassByEmail
@PostMapping("/changePassByEmail") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> changePassByEmail(@RequestBody String mail) Metodo para cambiar el pass del usuario por Email- Parameters:
mail-- Returns:
- el objeto response
-
filterClub
@PostMapping("filterClub") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> filterClub(@RequestBody String filter) METODO PARA FILTRAR LOS CLUBES- Parameters:
filter-- Returns:
- el objeto response
-
getAllClubes
@GetMapping("getAllClubes") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> getAllClubes()METODO PARA OBTENER TODOS LOS CLUBES- Returns:
- el objeto response
-
createUpdateImgUser
@PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("createupdateimguser/{userId}") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> createUpdateImgUser(org.springframework.web.multipart.MultipartFile[] files, @PathVariable String userId) metodo para actualizar la img del usuario- Parameters:
files-userId-- Returns:
- el objeto response
-
getUserListByTeam
@PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("getUserListByTeam/{teamId}") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> getUserListByTeam(@PathVariable String teamId) metodo para obtener los entrenadores de un equipo- Parameters:
teamId-- Returns:
- el objeto response
-
inviteCoach
@PostMapping("/inviteCoach/{teamId}/{userId}") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> inviteCoach(@RequestBody String mail, @PathVariable String teamId, @PathVariable int userId) Metodo para invitar a un entrenador a un equipo- Parameters:
mail-teamId-userId-- Returns:
- el objeto response
-
deleteCoach
@DeleteMapping("/deleteCoach/{teamId}/{userId}") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> deleteCoach(@PathVariable String teamId, @PathVariable String userId) Metodo para eliminar a un entrenador de un equipo- Parameters:
teamId-userId-- Returns:
- el objeto response
-
invitePlayer
@PostMapping("/invitePlayer/{playerId}/{isMenor}/{teamId}") public org.springframework.http.ResponseEntity<com.futbol.manager.response.Response> invitePlayer(@RequestBody String mail, @PathVariable String playerId, @PathVariable String isMenor, @PathVariable String teamId) metodo para invitar a un jugador- Parameters:
mail-playerId-isMenor-teamId-- Returns:
- el objeto response
-