Something went wrong. Try again.
Mirror of https://github.com/kualta/site — web infrastructure
Something went wrong. Try again.
1234567891011121314151617import type { APIRoute } from "astro";import type { Contact } from "@/types";import contactsData from "@/data/contacts.json";
export const GET: APIRoute = () => { const sorted = [...(contactsData as Contact[])].sort( (a, b) => a.platform.length + a.label.length - (b.platform.length + b.label.length), ); return new Response(JSON.stringify(sorted), { headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", }, });};