Commit fb0084e8 authored by Andreas Heimann's avatar Andreas Heimann

limited Discovery endpoints to 10 per page (was 12 before)

parent 6dd7daa7
......@@ -24,8 +24,8 @@ class SongRepository extends ServiceEntityRepository
$qb
->where('e.publicationStatus = 0')
->orderBy('e.uploadDate', 'DESC')
->setFirstResult(12 * $page)
->setMaxResults(12);
->setFirstResult(10 * $page)
->setMaxResults(10);
return $qb->getQuery()->getResult();
}
......@@ -35,8 +35,8 @@ class SongRepository extends ServiceEntityRepository
->where('e.publicationStatus = 0')
->orderBy('e.updateDate', 'DESC')
->addOrderBy('e.uploadDate', 'DESC')
->setFirstResult(12 * $page)
->setMaxResults(12);
->setFirstResult(10 * $page)
->setMaxResults(10);
return $qb->getQuery()->getResult();
}
......@@ -48,8 +48,8 @@ class SongRepository extends ServiceEntityRepository
->andWhere('e.uploadDate >= :end')
->orderBy('e.downloads', 'DESC')
->addOrderBy('e.views', 'DESC')
->setFirstResult(12 * $page)
->setMaxResults(12)
->setFirstResult(10 * $page)
->setMaxResults(10)
->setParameter('begin', new \DateTime('NOW'))
->setParameter('end', new \DateTime('-7 days'));
return $qb->getQuery()->getResult();
......@@ -63,8 +63,8 @@ class SongRepository extends ServiceEntityRepository
->andWhere('e.uploadDate >= :end')
->orderBy('e.downloads', 'DESC')
->addOrderBy('e.views', 'DESC')
->setFirstResult(12 * $page)
->setMaxResults(12)
->setFirstResult(10 * $page)
->setMaxResults(10)
->setParameter('begin', new \DateTime('NOW'))
->setParameter('end', new \DateTime('-1 month'));
return $qb->getQuery()->getResult();
......
......@@ -26,29 +26,34 @@
<div class="alert alert-primary" role="alert">
<h4 class="alert-heading">Last Update</h4>
This documentation was last updated on 11/28/2020 at 15:05 CEST
This documentation was last updated on 01/22/2021 at 14:58 CEST
</div>
<div class="card">
<h2 class="card-title">11/28/2020</h2>
<h2 class="card-title">01/22/2021</h2>
<ul>
<li>Deprecated the Open Discovery->Popular endpoint</li>
<li>Added a link to the main website</li>
<li>Removed the Open Discovery->Popular endpoint</li>
<li>Added difficulty ratings to songs</li>
<li>Added an update hash and update time to songs</li>
<li>Renamed Discovery->Hot endpoint to Discovery->HotThisWeek</li>
<li>Added Discovery->HotThisMonth endpoint</li>
<li>Added Discovery->Updated endpoint</li>
<li>Limited the Discovery endpoint outputs to 10 per page (was 12 before)</li>
</ul>
</div>
<div class="card">
<h2 class="card-title">11/02/2020</h2>
<h2 class="card-title">11/28/2020</h2>
<ul>
<li>Added preferred pronouns for user profiles</li>
<li>Deprecated the Open Discovery->Popular endpoint</li>
<li>Added a link to the main website</li>
</ul>
</div>
<div class="card">
<h2 class="card-title">10/14/2020</h2>
<h2 class="card-title">11/02/2020</h2>
<ul>
<li>Updated Tournament output</li>
<lI>Added Playlists</lI>
<li>Added preferred pronouns for user profiles</li>
</ul>
</div>
</div>
......
......@@ -141,7 +141,7 @@
<div class="card" id="new">
<h2 class="card-title">New Songs</h2>
<p>Returns the 12 newest songs. Use <code class="code">offset</code> for pagination.</p>
<p>Returns the 10 newest songs. Use <code class="code">offset</code> for pagination.</p>
<table class="table table-bordered">
<tr>
......@@ -201,7 +201,7 @@
<div class="card" id="updated">
<h2 class="card-title">Updated Songs</h2>
<p>Returns 12 songs that were last updated. Use <code class="code">offset</code> for pagination.</p>
<p>Returns 10 songs that were last updated. Use <code class="code">offset</code> for pagination.</p>
<table class="table table-bordered">
<tr>
......@@ -261,7 +261,7 @@
<div class="card" id="hotThisWeek">
<h2 class="card-title">Hot This Week Songs</h2>
<p>Returns the 12 most popular songs from the last 7 days. Use <code class="code">offset</code> for pagination.</p>
<p>Returns the 10 most popular songs from the last 7 days. Use <code class="code">offset</code> for pagination.</p>
<table class="table table-bordered">
<tr>
......@@ -321,7 +321,7 @@
<div class="card" id="hotThisMonth">
<h2 class="card-title">Hot This Month Songs</h2>
<p>Returns the 12 most popular songs from the last month. Use <code class="code">offset</code> for pagination.</p>
<p>Returns the 10 most popular songs from the last month. Use <code class="code">offset</code> for pagination.</p>
<table class="table table-bordered">
<tr>
......
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