fix(types): update fake seeders types + fix bugs

This commit is contained in:
Yassine Doghri 2021-06-08 16:57:04 +00:00
commit 76a4bf3441
No known key found for this signature in database
GPG key ID: 3E7F89498B960C9F
15 changed files with 78 additions and 59 deletions

View file

@ -661,8 +661,8 @@ class EpisodeController extends BaseController
$data = [
'podcast_id' => $this->podcast->id,
'episode_id' => $this->episode->id,
'start_time' => (int) $soundbite['start_time'],
'duration' => (int) $soundbite['duration'],
'start_time' => (float) $soundbite['start_time'],
'duration' => (float) $soundbite['duration'],
'label' => $soundbite['label'],
'updated_by' => user_id(),
];
@ -688,9 +688,9 @@ class EpisodeController extends BaseController
return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]);
}
public function soundbiteDelete(int $soundbiteId): RedirectResponse
public function soundbiteDelete(string $soundbiteId): RedirectResponse
{
(new SoundbiteModel())->deleteSoundbite($this->podcast->id, $this->episode->id, $soundbiteId);
(new SoundbiteModel())->deleteSoundbite($this->podcast->id, $this->episode->id, (int) $soundbiteId);
return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]);
}