MCPcopy Create free account
hub / github.com/code100x/cms / isUrlAccessible

Function isUrlAccessible

src/components/admin/ContentRenderer.tsx:22–29  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

20}
21
22async 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
31export const getMetadata = async (contentId: number) => {
32 const session = await getServerSession(authOptions);

Callers 1

getMetadataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected