Skip to content

Commit

Permalink
Update SeoForm and SeoService to allow null values for certain proper…
Browse files Browse the repository at this point in the history
…ties. (#3)
  • Loading branch information
terabytesoftw authored Dec 5, 2023
1 parent bb4982c commit 41f1e82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/UseCase/Seo/SeoForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

final class SeoForm extends Model
{
public string $h1 = '';
public string $title = '';
public string $keywords = '';
public string $description = '';
public string|null $h1 = '';
public string|null $title = '';
public string|null $keywords = '';
public string|null $description = '';

public function rules(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/UseCase/Seo/SeoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ public function run(SeoInterface $seo, SeoForm $seoForm, string $class, int $ite
$seo->class = $class;
$seo->item_id = $itemId;

return $this->persistenceRepository->update($seo);
return $this->persistenceRepository->save($seo);
}
}

0 comments on commit 41f1e82

Please sign in to comment.