From 7263f523c5592b321b10af0ec9fe3e376f0dc3da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=20K=C3=A4sler?= <tom.kaesler@mni.thm.de>
Date: Thu, 26 Jul 2018 13:44:23 +0200
Subject: [PATCH] remove duplicate content create

---
 .../content-text-creator.component.ts                    | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/app/components/fragments/content-text-creator/content-text-creator.component.ts b/src/app/components/fragments/content-text-creator/content-text-creator.component.ts
index 3d3ee0cb4..f1bc273e4 100644
--- a/src/app/components/fragments/content-text-creator/content-text-creator.component.ts
+++ b/src/app/components/fragments/content-text-creator/content-text-creator.component.ts
@@ -43,17 +43,14 @@ export class ContentTextCreatorComponent implements OnInit {
   }
 
   submitContent(subject: string, body: string) {
-      this.contentService.addContent(new ContentText(
-        '1', '1', this.roomId, subject, body, 1
-      )).subscribe();
+    this.contentService.addContent(new ContentText(
+      '1', '1', this.roomId, subject, body, 1
+    )).subscribe();
     if (this.content.body.valueOf() === '' || this.content.body.valueOf() === '') {
       this.notificationService.show('No empty fields allowed. Please check subject and body.');
       return;
     }
     this.notificationService.show('Content submitted.');
-    this.contentService.addContent(new ContentText(
-      '1', '1', this.roomId, subject, body, 1
-    )).subscribe();
     this.resetAfterSubmit();
   }
 
-- 
GitLab