(url: string)
| 20 | } |
| 21 | |
| 22 | async function isUrlAccessible(url: string): Promise<boolean> { |
| 23 | try { |
| 24 | const response = await fetch(url, { method: 'HEAD' }); |
| 25 | return response.ok; |
| 26 | } catch (error) { |
| 27 | return false; |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | export const getMetadata = async (contentId: number) => { |
| 32 | const session = await getServerSession(authOptions); |