Add creator full name

main
Paulo Gustavo Veiga 2024-02-19 21:15:45 -08:00
parent cf154de2e4
commit 08ce41da5f
2 changed files with 13 additions and 2 deletions

View File

@ -96,7 +96,7 @@ public class MindmapController extends BaseController {
lockFullName = lockInfo.getUser().getFullName();
}
return new RestMindmapMetadata(mindmap.getTitle(), mindMapBean.getProperties(), isLocked, lockFullName);
return new RestMindmapMetadata(mindmap.getTitle(), mindmap.getCreator().getFullName(), mindMapBean.getProperties(), isLocked, lockFullName);
}
@PreAuthorize("isAuthenticated() and hasRole('ROLE_USER')")

View File

@ -37,11 +37,14 @@ public class RestMindmapMetadata {
private String title;
private String isLockedBy;
public RestMindmapMetadata(@NotNull String title, @NotNull String jsonProps, boolean locked, @Nullable String isLockedBy) {
private String creatorFullName;
public RestMindmapMetadata(@NotNull String title, @NotNull String jsonProps, @NotNull String creatorFullName, boolean locked, @Nullable String isLockedBy) {
this.jsonProps = jsonProps;
this.title = title;
this.locked = locked;
this.isLockedBy = isLockedBy;
this.creatorFullName = creatorFullName;
}
public String getJsonProps() {
@ -75,4 +78,12 @@ public class RestMindmapMetadata {
public void setIsLockedBy(String isLockedBy) {
this.isLockedBy = isLockedBy;
}
public String getCreatorFullName() {
return creatorFullName;
}
public void setCreatorFullName(String creatorFullName) {
this.creatorFullName = creatorFullName;
}
}