bojanz / musicbox

Silex demo project (music portal)
MIT License
113 stars 39 forks source link

Likes aren't recorded to the DB #7

Open olberger opened 7 years ago

olberger commented 7 years ago

The likes aren't saved by the factory to the DB.

The following patch should fix this:

@@ -31,10 +31,11 @@ class ArtistRepository implements RepositoryInterface
             'name' => $artist->getName(),
             'short_biography' => $artist->getShortBiography(),
             'biography' => $artist->getBiography(),
             'soundcloud_url' => $artist->getSoundCloudUrl(),
             'image' => $artist->getImage(),
+            'likes' => $artist->getLikes(),
         );

         if ($artist->getId()) {
             // If a new image was uploaded, make sure the filename gets set.
             $newFile = $this->handleFileUpload($artist);

Hope this helps.

olberger commented 7 years ago

Cherry-pick from https://github.com/olberger/musicbox/commit/c70ef15f997ee0bbd61b592bc952ee5accf42c55 at will