(env, slug)
| 414 | } |
| 415 | } |
| 416 | |
| 417 | async 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 | |
| 425 | function voteStoreFetch(env, path, init) { |
no test coverage detected