Skip to content

Commit

Permalink
Rename platform_breakdown to platforms key
Browse files Browse the repository at this point in the history
  • Loading branch information
pyropy committed Feb 18, 2025
1 parent 7f0549f commit d18d969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stats/lib/platform-stats-fetchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const fetchDailyDesktopUsers = async (pgPool, filter) => {
if (platform === null) {
days[day].total += total
} else {
days[day].platform_breakdown.push({ platform, total })
days[day].platforms.push({ platform, total })
}
}

Expand Down
4 changes: 2 additions & 2 deletions stats/test/platform-routes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ describe('Platform Routes HTTP request handler', () => {
await assertResponseStatus(res, 200)
const daily = await res.json()
assert.deepStrictEqual(daily, [
{ day: '2000-01-01', total: 30, platform_breakdown: [{ platform: 'darwin', total: 10 }, { platform: 'linux', total: 10 }, { platform: 'win32', total: 10 }] },
{ day: '2000-01-03', total: 20, platform_breakdown: [{ platform: 'darwin', total: 5 }, { platform: 'linux', total: 5 }, { platform: 'win32', total: 10 }] }
{ day: '2000-01-01', total: 30, platforms: [{ platform: 'darwin', total: 10 }, { platform: 'linux', total: 10 }, { platform: 'win32', total: 10 }] },
{ day: '2000-01-03', total: 20, platforms: [{ platform: 'darwin', total: 5 }, { platform: 'linux', total: 5 }, { platform: 'win32', total: 10 }] }
])
})
})
Expand Down

0 comments on commit d18d969

Please sign in to comment.