mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
Update 16 files
- /src/main/resources/templates/create-account.html - /src/main/resources/templates/my-profile.html - /src/main/resources/templates/home.html - /src/main/resources/templates/update-recipe.html - /src/main/resources/templates/explore.html - /src/main/resources/templates/public-profile.html - /src/main/java/com/example/demo/controller/SiteController.java - /src/main/java/com/example/demo/controller/ProfileController.java - /src/main/java/com/example/demo/dto/UserDto.java - /src/main/java/com/example/demo/dto/UpdateProfileDto.java - /src/main/java/com/example/demo/dto/ProfileDto.java - /src/main/java/com/example/demo/service/Impl/RecipeServiceImpl.java - /src/main/java/com/example/demo/service/Impl/UserServiceImpl.java - /src/main/java/com/example/demo/service/UserService.java - /src/main/java/com/example/demo/config/SecurityConfig.java - /src/main/java/com/example/demo/entity/User.java
This commit is contained in:
@@ -4,6 +4,8 @@ public class UserDto {
|
||||
private Integer id;
|
||||
private String username;
|
||||
private String email;
|
||||
private String displayName;
|
||||
private String bio;
|
||||
|
||||
public UserDto() {
|
||||
}
|
||||
@@ -14,6 +16,14 @@ public class UserDto {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public UserDto(Integer id, String username, String email, String displayName, String bio) {
|
||||
this.id = id;
|
||||
this.username = username;
|
||||
this.email = email;
|
||||
this.displayName = displayName;
|
||||
this.bio = bio;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -38,4 +48,26 @@ public class UserDto {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
}
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getBio() {
|
||||
return bio;
|
||||
}
|
||||
|
||||
public void setBio(String bio) {
|
||||
this.bio = bio;
|
||||
}
|
||||
|
||||
public String getEffectiveDisplayName() {
|
||||
if (displayName != null && !displayName.isBlank()) {
|
||||
return displayName;
|
||||
}
|
||||
return username;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user