task-260(admin.html观感对齐): 软件版本页对齐(zip 校验文案/发布成功含链接/下载列/空态)
This commit is contained in:
@@ -33,3 +33,11 @@ export function parseSoftwareVersionList(payload: unknown): SoftwareVersionList
|
||||
: []
|
||||
return { items }
|
||||
}
|
||||
|
||||
/** 上传成功后返回的新版本行(data.item);无 item 回 null。 */
|
||||
export function parseSoftwareVersionUpload(payload: unknown): SoftwareVersionItem | null {
|
||||
const data = unwrap<unknown>(payload)
|
||||
if (!data || typeof data !== 'object') return null
|
||||
const item = (data as Record<string, unknown>).item
|
||||
return item ? toSoftwareVersionItem(item) : null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user