Commit 5054f4f3 authored by SpinShare's avatar SpinShare

correct user song ordering

parent 822a57fe
......@@ -444,7 +444,7 @@ class APIController extends AbstractController
}
// Get User Songs
$resultsSongs = $em->getRepository(Song::class)->findBy(array('uploader' => $result->getId()));
$resultsSongs = $em->getRepository(Song::class)->findBy(array('uploader' => $result->getId()), array('uploadDate' => 'DESC'));
$data['songs'] = [];
......
......@@ -44,7 +44,7 @@ class UserController extends AbstractController
$resultUser = $em->getRepository(User::class)->findOneBy(array('id' => $userId));
if(!$resultUser) throw new NotFoundHttpException();
$resultUploads = $em->getRepository(Song::class)->findBy(array('uploader' => $resultUser->getId()));
$resultUploads = $em->getRepository(Song::class)->findBy(array('uploader' => $resultUser->getId()), array('uploadDate' => 'DESC'));
$data['user'] = $resultUser;
$data['uploads'] = $resultUploads;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment