MCPcopy Create free account
hub / github.com/Forward-Future/loopy / isPublishedLoop

Function isPublishedLoop

loop-library/worker/src/auth-votes.js:416–422  ·  view source on GitHub ↗
(env, slug)

Source from the content-addressed store, hash-verified

414 }
415}
416
417async function isPublishedLoop(env, slug) {
418 const id = env.LOOP_CATALOG.idFromName(LOOP_CATALOG_INSTANCE);
419 const response = await env.LOOP_CATALOG.get(id).fetch("https://loop-catalog/published");
420 if (!response.ok) return false;
421 const catalog = await response.json();
422 return catalog.initialized && catalog.loops.some((loop) => loop.slug === slug);
423}
424
425function voteStoreFetch(env, path, init) {

Callers 1

handleAuthVoteRouteFunction · 0.85

Calls 3

idFromNameMethod · 0.45
fetchMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected