added security and fix edit profile
This commit is contained in:
@@ -16,6 +16,7 @@ public interface PostMapper {
|
||||
@Mapping(source = "category", target = "category", qualifiedByName = "stringToPostCategory")
|
||||
Post toEntity(PostRequest request);
|
||||
|
||||
@Mapping(source = "user.id", target = "userId")
|
||||
@Mapping(source = "user.login", target = "userEmail")
|
||||
@Mapping(source = "images", target = "images", qualifiedByName = "imagesToUrls")
|
||||
@Mapping(target = "category", expression = "java(post.getCategory().getDisplayName())")
|
||||
|
||||
Reference in New Issue
Block a user