fix cranking

This commit is contained in:
HF 2022-09-24 17:29:34 +02:00
parent a143e3737e
commit 5e1bf23d17
2 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,7 @@ const Rankings = () => {
<td>{rank.px}</td>
</tr>
)),
countries: prevTop.map((rank, ind) => (
countries: dailyCRanking.map((rank, ind) => (
<tr key={rank.name}>
<td>{ind + 1}</td>
<td title={rank.cc}><img

View File

@ -84,6 +84,8 @@ export async function getRanks(daily, start, amount) {
* get daily country ranking
*/
export async function getCountryRanks(start, amount) {
start -= 1;
amount -= 1;
let ranks = await client.zRangeWithScores(
DAILY_CRANKED_KEY, start, start + amount, {
REV: true,