Skip to content
Snippets Groups Projects
Commit 7263f523 authored by Tom Käsler's avatar Tom Käsler
Browse files

remove duplicate content create

parent 64706f6c
No related merge requests found
...@@ -43,17 +43,14 @@ export class ContentTextCreatorComponent implements OnInit { ...@@ -43,17 +43,14 @@ export class ContentTextCreatorComponent implements OnInit {
} }
submitContent(subject: string, body: string) { submitContent(subject: string, body: string) {
this.contentService.addContent(new ContentText( this.contentService.addContent(new ContentText(
'1', '1', this.roomId, subject, body, 1 '1', '1', this.roomId, subject, body, 1
)).subscribe(); )).subscribe();
if (this.content.body.valueOf() === '' || this.content.body.valueOf() === '') { if (this.content.body.valueOf() === '' || this.content.body.valueOf() === '') {
this.notificationService.show('No empty fields allowed. Please check subject and body.'); this.notificationService.show('No empty fields allowed. Please check subject and body.');
return; return;
} }
this.notificationService.show('Content submitted.'); this.notificationService.show('Content submitted.');
this.contentService.addContent(new ContentText(
'1', '1', this.roomId, subject, body, 1
)).subscribe();
this.resetAfterSubmit(); this.resetAfterSubmit();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment