Skip to content

Commit

Permalink
Fix problem with whiteboard templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanos committed Nov 1, 2024
1 parent 72a05ff commit 6e72020
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/domain/template/template/template.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ export class TemplateService {
},
select: {
id: true,
type: true,
postDefaultDescription: templateInput.type === TemplateType.POST,
whiteboard:
templateInput.type === TemplateType.WHITEBOARD
? {
Expand All @@ -267,10 +269,8 @@ export class TemplateService {
template.whiteboard &&
templateData.whiteboardContent
) {
await this.whiteboardService.updateWhiteboardContent(
template.whiteboard.id,
templateData.whiteboardContent
);
// If we don't update the content here, the whiteboard will is overwritten with the old content
template.whiteboard.content = templateData.whiteboardContent;
}

return await this.templateRepository.save(template);
Expand Down

0 comments on commit 6e72020

Please sign in to comment.