Initial commit

This commit is contained in:
decolua
2026-01-05 09:58:59 +07:00
commit 3857598de4
159 changed files with 14537 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { NextResponse } from "next/server";
import { getProviderConnections } from "@/lib/localDb";
// GET /api/providers/client - List all connections for client (includes sensitive fields for sync)
export async function GET() {
try {
const connections = await getProviderConnections();
// Include sensitive fields for sync to cloud (only accessible from same origin)
const clientConnections = connections.map(c => ({
...c,
// Don't hide sensitive fields here since this is for internal sync
}));
return NextResponse.json({ connections: clientConnections });
} catch (error) {
console.log("Error fetching providers for client:", error);
return NextResponse.json({ error: "Failed to fetch providers" }, { status: 500 });
}
}