diff --git a/lib/Controller/ShowController.php b/lib/Controller/ShowController.php index 6a08a90e0ac49720d66311cb9703fadc873d064b..4d2efa189b5dd49c3807a72e1bc2202be768154e 100644 --- a/lib/Controller/ShowController.php +++ b/lib/Controller/ShowController.php @@ -65,10 +65,10 @@ class ShowController extends Controller { /** * @NoAdminRequired */ - public function create(int $id, int $podcastid, string $imgurl, - string $author, string $title): DataResponse { - return new DataResponse($this->service->create($id, $podcastid, $imgurl, - $author, $title, $this->userId)); + public function create(int $id, string $imgurl, string $author, + string $title): DataResponse { + return new DataResponse($this->service->create($id, $imgurl, $author, + $title, $this->userId)); } /** diff --git a/lib/Db/Show.php b/lib/Db/Show.php index a6c60042bdc6730d04f4dd6e78776e64c4c608b9..7ec543d2dd8d534baa1a505544f056eddd386c91 100644 --- a/lib/Db/Show.php +++ b/lib/Db/Show.php @@ -28,7 +28,6 @@ use JsonSerializable; use OCP\AppFramework\Db\Entity; class Show extends Entity implements JsonSerializable { - protected $podcastid; protected $imgurl; protected $author; protected $title; @@ -37,7 +36,6 @@ class Show extends Entity implements JsonSerializable { public function jsonSerialize(): array { return [ 'id' => $this->id, - 'podcastid' => $this->podcastid, 'imgurl' => $this->imgurl, 'author' => $this->author, 'title' => $this->title, diff --git a/lib/Migration/Version000000Date20181013124731.php b/lib/Migration/Version000000Date20181013124731.php index 1d88588cfb18e9d884621891f49a5f6269581efc..3528650ea3be5604e7e20301f269d31405776aee 100644 --- a/lib/Migration/Version000000Date20181013124731.php +++ b/lib/Migration/Version000000Date20181013124731.php @@ -45,15 +45,11 @@ class Version000000Date20181013124731 extends SimpleMigrationStep { if (!$schema->hasTable('shows')) { $table = $schema->createTable('shows'); $table->addColumn('id', 'integer', [ - 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('user_id', 'string', [ 'notnull' => true, ]); - $table->addColumn('podcastid', 'integer', [ - 'notnull' => true, - ]); $table->addColumn('imgurl', 'string'); $table->addColumn('author', 'string'); $table->addColumn('title', 'string'); diff --git a/lib/Service/ShowService.php b/lib/Service/ShowService.php index 383f9a2216f3f64f5d4e4d2b627785ae7a346a11..7aa0cb6c7433bd30897e09fde85a10003b9682b3 100644 --- a/lib/Service/ShowService.php +++ b/lib/Service/ShowService.php @@ -66,9 +66,9 @@ class ShowService { } } - public function create($podcastid, $imgurl, $author, $title, $userId) { + public function create($id, $imgurl, $author, $title, $userId) { $show = new Show(); - $show->setPodcastid($podcastid); + $show->setId($id); $show->setImgurl($imgurl); $show->setAuthor($author); $show->setTitle($title); diff --git a/src/views/Show.vue b/src/views/Show.vue index 887c308353d556f2ea846b7122cfa514978264df..629ad33d2046681bc5beab5c4ccf7c8bff953cc6 100644 --- a/src/views/Show.vue +++ b/src/views/Show.vue @@ -137,8 +137,7 @@ export default { async doSubscribe() { const podcastShow = { - id: -1, - podcastid: this.podcast.id, + id: this.podcast.id, imgurl: this.podcast.smallImageURL, title: this.podcast.title, author: this.podcast.author,