fix cranking
This commit is contained in:
parent
a143e3737e
commit
5e1bf23d17
|
@ -130,7 +130,7 @@ const Rankings = () => {
|
||||||
<td>{rank.px}</td>
|
<td>{rank.px}</td>
|
||||||
</tr>
|
</tr>
|
||||||
)),
|
)),
|
||||||
countries: prevTop.map((rank, ind) => (
|
countries: dailyCRanking.map((rank, ind) => (
|
||||||
<tr key={rank.name}>
|
<tr key={rank.name}>
|
||||||
<td>{ind + 1}</td>
|
<td>{ind + 1}</td>
|
||||||
<td title={rank.cc}><img
|
<td title={rank.cc}><img
|
||||||
|
|
|
@ -84,6 +84,8 @@ export async function getRanks(daily, start, amount) {
|
||||||
* get daily country ranking
|
* get daily country ranking
|
||||||
*/
|
*/
|
||||||
export async function getCountryRanks(start, amount) {
|
export async function getCountryRanks(start, amount) {
|
||||||
|
start -= 1;
|
||||||
|
amount -= 1;
|
||||||
let ranks = await client.zRangeWithScores(
|
let ranks = await client.zRangeWithScores(
|
||||||
DAILY_CRANKED_KEY, start, start + amount, {
|
DAILY_CRANKED_KEY, start, start + amount, {
|
||||||
REV: true,
|
REV: true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user