swoop-common 2.2.213 → 2.2.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -77,7 +77,11 @@ export const fetchMediaAssets = (params) => __awaiter(void 0, void 0, void 0, fu
|
|
|
77
77
|
if (!response.ok)
|
|
78
78
|
throw new Error(`Failed to fetch media assets: ${response.status}`);
|
|
79
79
|
const data = yield response.json();
|
|
80
|
-
|
|
80
|
+
// The core-data-service forward proxy strips the Accept header, so API Platform
|
|
81
|
+
// may serialize as a plain JSON array instead of the Hydra {member: [...]} wrapper
|
|
82
|
+
const items = (Array.isArray(data)
|
|
83
|
+
? data
|
|
84
|
+
: data.member || []);
|
|
81
85
|
return { items, hasMore: items.length === itemsPerPage };
|
|
82
86
|
});
|
|
83
87
|
export const fetchMediaTags = (region) => __awaiter(void 0, void 0, void 0, function* () {
|