diff --git a/backend/app_be/models.py b/backend/app_be/models.py index 2576ad2..6291e02 100644 --- a/backend/app_be/models.py +++ b/backend/app_be/models.py @@ -16,6 +16,7 @@ class Feed(models.Model): icon = models.FileField(upload_to='feed-icons', blank=True, null=True, validators=[FileExtensionValidator(['png', 'svg'])]) keywords = models.TextField(blank=False, null=False) + match_all_keywords = models.BooleanField(blank=True, default=False) class FeedEntry(models.Model): @@ -24,7 +25,7 @@ class FeedEntry(models.Model): class Tweet(models.Model): - icon = models.ForeignKey(Icon, on_delete=models.CASCADE,null=True) + icon = models.ForeignKey(Icon, on_delete=models.CASCADE, null=True) text = models.CharField(max_length=137) date_time = models.DateTimeField() url = models.CharField(max_length=100) diff --git a/frontend/src/app/component/einstellungen/editieren/editieren.component.html b/frontend/src/app/component/einstellungen/editieren/editieren.component.html index 66b7f25..5568431 100644 --- a/frontend/src/app/component/einstellungen/editieren/editieren.component.html +++ b/frontend/src/app/component/einstellungen/editieren/editieren.component.html @@ -14,7 +14,7 @@ Gesuchte Stichwörter - Alle Stichworte müssen enthalten sein + Alle Stichworte müssen enthalten sein
diff --git a/frontend/src/app/component/einstellungen/editieren/editieren.component.ts b/frontend/src/app/component/einstellungen/editieren/editieren.component.ts index 9ebc554..07bcf38 100644 --- a/frontend/src/app/component/einstellungen/editieren/editieren.component.ts +++ b/frontend/src/app/component/einstellungen/editieren/editieren.component.ts @@ -20,6 +20,7 @@ export class EditierenComponent implements OnInit { feedForm: FormGroup; url: String; active = true; + match_all_keywords = false; icon: File; keywords: String; @@ -44,7 +45,8 @@ export class EditierenComponent implements OnInit { url: this.url, active: this.active, icon: [undefined, [FileValidator.maxContentSize(this.maxSize)]], - keywords: this.keywords + keywords: this.keywords, + match_all_keywords: this.match_all_keywords }); } @@ -60,6 +62,8 @@ export class EditierenComponent implements OnInit { const form: FormData = new FormData(); form.append('url', feedData.url); form.append('active', feedData.active); + form.append('match_all_keywords', feedData.match_all_keywords); + console.log('Match all: ' + feedData.match_all_keywords); if (feedData.keywords != null) { form.append('keywords', feedData.keywords); }