так, ну на логин перебрасывает :_)
This commit is contained in:
parent
8bdbd72802
commit
88cb673966
@ -1,5 +0,0 @@
|
||||
package com.example.backend.favorites.repository;
|
||||
|
||||
public class CrudRepository<T1, T2> {
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.example.backend.users.api;
|
||||
|
||||
import com.example.backend.users.model.UserRole;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@ -13,14 +14,14 @@ public class UserDTO {
|
||||
|
||||
@NotBlank
|
||||
@Size(min = 2, max = 50)
|
||||
private String username;
|
||||
private String login;
|
||||
|
||||
@NotBlank
|
||||
@Size(min = 2, max = 10)
|
||||
private String password;
|
||||
|
||||
@NotNull
|
||||
private boolean isAdmin;
|
||||
private UserRole role;
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
|
||||
public Integer getId() {
|
||||
@ -31,12 +32,12 @@ public class UserDTO {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
public String getLogin() {
|
||||
return login;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
public void setLogin(String login) {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
@ -47,11 +48,11 @@ public class UserDTO {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public boolean getIsAdmin() {
|
||||
return isAdmin;
|
||||
public UserRole getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setIsAdmin(boolean isAdmin) {
|
||||
this.isAdmin = isAdmin;
|
||||
public void setRole(UserRole role) {
|
||||
this.role = role;
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,5 @@ import org.springframework.data.repository.CrudRepository;
|
||||
import com.example.backend.users.model.UserEntity;
|
||||
|
||||
public interface UserRepository extends CrudRepository<UserEntity, Integer> {
|
||||
Optional<UserEntity> findByUsernameIgnoreCase(String username);
|
||||
|
||||
Optional<UserEntity> findByLoginIgnoreCase(String login);
|
||||
}
|
||||
|
0
backend/src/main/resources/templates/login.html
Normal file
0
backend/src/main/resources/templates/login.html
Normal file
BIN
data.mv.db
BIN
data.mv.db
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user