cambio al post de login (añadi rol cliente por defecto)
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -26,12 +26,12 @@ public class AppController {
|
|||||||
// Registro
|
// Registro
|
||||||
@PostMapping("/auth/registrar")
|
@PostMapping("/auth/registrar")
|
||||||
public String registrar(@RequestParam String username,
|
public String registrar(@RequestParam String username,
|
||||||
@RequestParam String password,
|
@RequestParam String password) {
|
||||||
@RequestParam Set<Rol> roles) {
|
usuarioService.registrarUsuario(username, password, Set.of(Rol.CLIENTE));
|
||||||
usuarioService.registrarUsuario(username, password, roles);
|
|
||||||
return "Usuario registrado, pendiente de aprobación";
|
return "Usuario registrado, pendiente de aprobación";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Verificar si aprobado
|
// Verificar si aprobado
|
||||||
@GetMapping("/auth/verificar/{username}")
|
@GetMapping("/auth/verificar/{username}")
|
||||||
public ConfirmadoTF verificar(@PathVariable String username) {
|
public ConfirmadoTF verificar(@PathVariable String username) {
|
||||||
|
|||||||
Reference in New Issue
Block a user