File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
backend/src/main/java/io/easystartup/suggestfeature
frontend/src/app/[slug]/changelog/[id] Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public class ChangelogUpdateDTO {
2020 private List <String > tags ;
2121 private Long changelogDate ;
2222 private boolean draft ;
23+ private String coverImage ;
2324
2425 public ChangelogUpdateDTO () {
2526 }
@@ -79,4 +80,12 @@ public boolean isDraft() {
7980 public void setDraft (boolean draft ) {
8081 this .draft = draft ;
8182 }
83+
84+ public String getCoverImage () {
85+ return coverImage ;
86+ }
87+
88+ public void setCoverImage (String coverImage ) {
89+ this .coverImage = coverImage ;
90+ }
8291}
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ public Response updateChangelogDetails(ChangelogUpdateDTO req) {
136136 existingChangelog .setModifiedAt (System .currentTimeMillis ());
137137 existingChangelog .setDraft (req .isDraft ());
138138 existingChangelog .setTags (req .getTags ());
139+ existingChangelog .setCoverImage (req .getCoverImage ());
139140 // To ensure only this org postIds are being set
140141 existingChangelog .setPostIds (getPostIdsForCurrentOrg (req .getPostIds (), orgId ));
141142 if (req .getChangelogDate () != null ) {
Original file line number Diff line number Diff line change @@ -95,7 +95,12 @@ const ChangelogEditor = ({ params }) => {
9595 data . content = JSON . parse ( data . content || '{}' ) ;
9696 setChangelogData ( data ) ;
9797 setIsDraft ( data . draft ) ;
98+
99+ if ( typeof window !== 'undefined' && ! editorRef . current ) {
100+ initEditor ( ) ;
101+ }
98102 if ( editorRef . current ) {
103+ console . log ( data . content )
99104 editorRef . current . render ( data . content ) ;
100105 }
101106 } catch ( error ) {
@@ -212,7 +217,7 @@ const ChangelogEditor = ({ params }) => {
212217 } ;
213218
214219 return (
215- < Card className = "w-full mx-auto mt-4 border-0" >
220+ < Card className = "w-full mx-auto mt-4 border-0 px-4 " >
216221 { /* <CardHeader> */ }
217222 { /* <CardTitle>Changelog Editor</CardTitle> */ }
218223 { /* </CardHeader> */ }
You can’t perform that action at this time.
0 commit comments