fix(SW-190): added imageVaultAsset schema
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
ImageVaultAsset,
|
||||
InsertResponse,
|
||||
} from "@/types/components/imageVaultImage"
|
||||
ImageVaultAssetResponse,
|
||||
} from "@/types/components/imageVault"
|
||||
|
||||
export function insertResponseToImageVaultAsset(
|
||||
response: InsertResponse
|
||||
response: ImageVaultAssetResponse
|
||||
): ImageVaultAsset {
|
||||
const alt = response.Metadata?.find((meta) =>
|
||||
meta.Name.includes("AltText_")
|
||||
@@ -32,6 +32,6 @@ export function insertResponseToImageVaultAsset(
|
||||
|
||||
export function makeImageVaultImage(image: any) {
|
||||
return image && !!Object.keys(image).length
|
||||
? insertResponseToImageVaultAsset(image as InsertResponse)
|
||||
? insertResponseToImageVaultAsset(image as ImageVaultAssetResponse)
|
||||
: undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user