Skip to content

Commit

Permalink
Merge pull request #7 from ziwu7/qrz0905
Browse files Browse the repository at this point in the history
[fix]Fix the output type of getHistory function.
  • Loading branch information
ziwu7 committed Sep 5, 2024
2 parents 06cd4dc + a9d2ae6 commit 5e1a4e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/service/Epidemic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ export async function getHistory() {
const { body } = await epidemic.get<AreaData[]>('Area', { Range: '0-199' });

const updatedBody = body.map(item => ({
...item,
id: item.id,
updateTime: item.updateTime,
provinceShortName: item.provinceName,
confirmedCount: item.province_confirmedCount,
suspectedCount: item.province_suspectedCount,
curedCount: item.province_curedCount,
deadCount: item.province_deadCount
}));
return updatedBody as unknown as Province[];

return updatedBody as Province[];
}

export async function getCurrent() {
Expand Down

0 comments on commit 5e1a4e0

Please sign in to comment.