This commit is contained in:
2026-09-10 14:15:44 +08:00
parent 2460278cd9
commit 33b79edd18
2 changed files with 4 additions and 2 deletions
@@ -75,8 +75,9 @@ function normalize(value: RawContainerCustomsView): ContainerCustomsView {
}
export async function getContainerCustoms(loadingPlanId: string) {
const response = await http.get<ApiEnvelope<RawContainerCustomsView>, ApiEnvelope<RawContainerCustomsView>>(`${basePath}/${encodeURIComponent(loadingPlanId)}`)
return normalize(unwrapApiResponse(response))
const response = await http.get<ApiEnvelope<RawContainerCustomsView | null>, ApiEnvelope<RawContainerCustomsView | null>>(`${basePath}/${encodeURIComponent(loadingPlanId)}`)
const value = unwrapApiResponse(response)
return value ? normalize(value) : null
}
export function downloadContainerCustomsDocument(documentId: string) {