From 623ad6aeed25337caaa095e3d4948034d5b2db37 Mon Sep 17 00:00:00 2001 From: Michal Ostrowski Date: Wed, 3 Apr 2024 11:29:20 +0200 Subject: [PATCH] feat: add localizations field --- src/content-fusion/content-fusion.ts | 4 ++-- src/content-fusion/dto/content-node-dto.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/content-fusion/content-fusion.ts b/src/content-fusion/content-fusion.ts index e7d7d13..c58c116 100644 --- a/src/content-fusion/content-fusion.ts +++ b/src/content-fusion/content-fusion.ts @@ -15,8 +15,8 @@ export class ContentFusion { const url = `${this.baseUrl}/content/${contentId}`; const res = await new HttpClientProxy().get(url); if (locale) { - if (res?.localization?.[locale]) { - const localization = res.localization[locale]; + if (res?.localizations?.[locale]) { + const localization = res.localizations[locale]; res.localization = {}; res.localization[locale] = localization; } else { diff --git a/src/content-fusion/dto/content-node-dto.ts b/src/content-fusion/dto/content-node-dto.ts index a9ac278..18c4a71 100644 --- a/src/content-fusion/dto/content-node-dto.ts +++ b/src/content-fusion/dto/content-node-dto.ts @@ -24,5 +24,6 @@ export class Contents { readonly updatedAt: string; readonly id: string; localization: Record; + localizations: Record; readonly tags: Tag[]; }