async function fetchMedia()

in apps/community-website/src/shared/api/fetch.ts [48:62]


async function fetchMedia(id: string) {
    try {
        return await callManageResourcesLambda('getMedia', { id }).then(
            (response) => ({
                ...response,
                sections: response.sections.map((section) => ({
                    title: section.label,
                    id: section.id,
                })),
            })
        )
    } catch (error) {
        return { id }
    }
}