import { r as refreshCollection } from '../../../../../chunks/collection-manager_BVQmA0IS.mjs';
export { renderers } from '../../../../../renderers.mjs';

const POST = async ({ params }) => {
  try {
    const id = params.id;
    const count = await refreshCollection(id);
    return new Response(JSON.stringify({ refreshed: true, products: count }), {
      headers: { "Content-Type": "application/json" }
    });
  } catch (e) {
    return new Response(JSON.stringify({ error: e.message }), { status: 400 });
  }
};

const _page = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
  __proto__: null,
  POST
}, Symbol.toStringTag, { value: 'Module' }));

const page = () => _page;

export { page };
