docs(阶段3): 记录出口标准达成;补跑 prettier
覆盖率对账表更新:admin 侧 3/45 已实现,缺口 42。达成判据是 apps/web 的 oj/ 与 shared/ 两个目录已无指向旧 Django 的运行时调用,残留的 utils/http 引用只剩 ApiResponse 这一个类型。 顺带补跑 npm fmt,几个此前未格式化的文件随之改动,均为纯格式。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,16 +6,19 @@ import type {
|
||||
} from "utils/types"
|
||||
|
||||
export function getAchievements(name?: string) {
|
||||
return api2.get<any>("achievements", { params: name ? { username: name } : {} })
|
||||
return api2
|
||||
.get<any>("achievements", { params: name ? { username: name } : {} })
|
||||
.then((response) => ({
|
||||
...response,
|
||||
data: {
|
||||
username: response.data.username,
|
||||
achievements: response.data.achievements.map((item: any): Achievement => ({
|
||||
...item,
|
||||
unlock_time: item.unlockTime,
|
||||
unlock_rate: item.unlockRate,
|
||||
})),
|
||||
achievements: response.data.achievements.map(
|
||||
(item: any): Achievement => ({
|
||||
...item,
|
||||
unlock_time: item.unlockTime,
|
||||
unlock_rate: item.unlockRate,
|
||||
}),
|
||||
),
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user