summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/foundation/media/associations.js
blob: 7e2b08857dffcb42fcedbcc523e94dc184ed8554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import * as serverData from "../json-parsing/server-data";
/**
 * @param data The media api data to find teh card in
 * @returns The editorial-card data for this media api item, this will return the first associated card
 */
export function editorialCardsFromData(data) {
    const editorialCards = serverData.asArrayOrEmpty(data, "meta.associations.editorial-cards.data");
    return editorialCards;
}
/**
 * @param data The media api data to find teh card in
 * @returns The editorial-card data for this media api item, this will return the first associated card
 */
export function editorialCardFromData(data) {
    return serverData.asInterface(editorialCardsFromData(data)[0]);
}
//# sourceMappingURL=associations.js.map