import { j as json } from './index-Djsj11qr.js';
import { g as getTelescopeSources } from './sources.server-C2PLxQXh.js';
import './shared-server-DaWdgxVh.js';
import 'zod';

const GET = async () => {
  try {
    const sources = getTelescopeSources();
    if (!sources.length) {
      return json({ error: "No Telescope sources are configured" }, { status: 500 });
    }
    return json(
      sources.map(({ id, label }) => ({ id, label })),
      { headers: { "cache-control": "no-store" } }
    );
  } catch (error) {
    console.error("Failed to load Telescope sources:", error);
    return json({ error: "Failed to load Telescope sources" }, { status: 500 });
  }
};

export { GET };
//# sourceMappingURL=_server.ts-DviONucl.js.map
