fix: set episode guid upon episode creation

fixes #48
This commit is contained in:
Yassine Doghri 2020-10-12 15:57:01 +00:00
parent 9f00305844
commit ad8b153f2a
2 changed files with 2 additions and 1 deletions

View File

@ -111,6 +111,7 @@ class Episode extends BaseController
'podcast_id' => $this->podcast->id,
'title' => $this->request->getPost('title'),
'slug' => $this->request->getPost('slug'),
'guid' => '',
'enclosure' => $this->request->getFile('enclosure'),
'description' => $this->request->getPost('description'),
'image' => $this->request->getFile('image'),

View File

@ -199,7 +199,7 @@ class Episode extends Entity
);
}
public function setGuid($guid = null)
public function setGuid(string $guid)
{
return $this->attributes['guid'] = empty($guid)
? $this->getLink()