Lint Netlify functions
This commit is contained in:
parent
eb85319f73
commit
d2f3cada52
11 changed files with 83 additions and 90 deletions
|
@ -28,16 +28,15 @@ const handler: Handler = async () => {
|
|||
mania: {global: 0, country: 0},
|
||||
};
|
||||
|
||||
for (let i = 0; i < profile.length; i++) {
|
||||
const ruleset = profile[i];
|
||||
for (const ruleset of profile) {
|
||||
if (ruleset.rank_history) {
|
||||
const stats = ruleset.statistics;
|
||||
info[ruleset.rank_history.mode].global = stats.global_rank || 0;
|
||||
info[ruleset.rank_history.mode].country = stats.country_rank || 0;
|
||||
info[ruleset.rank_history.mode].global = stats.global_rank ?? 0;
|
||||
info[ruleset.rank_history.mode].country = stats.country_rank ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
api.revokeToken();
|
||||
void api.revokeToken();
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue