Spaces:
Sleeping
Sleeping
Download apps/api/src/lib/extract/team-id-sync.ts from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 652 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/lib/extract/team-id-sync.ts
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/api/src/lib/extract/team-id-sync.ts
-
curl -L -o team-id-sync.ts https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/api/src/lib/extract/team-id-sync.ts
652 Bytes
| import { supabase_rr_service, supabase_service } from "../../services/supabase"; | |
| import { logger } from "../logger"; | |
| import { withAuth } from "../withAuth"; | |
| async function getTeamIdSyncBOriginal(teamId: string) { | |
| try { | |
| const { data, error } = await supabase_rr_service | |
| .from("eb-sync") | |
| .select("team_id") | |
| .eq("team_id", teamId) | |
| .limit(1); | |
| if (error) { | |
| throw new Error("Error getting team id (sync b)"); | |
| } | |
| return data[0] ?? null; | |
| } catch (error) { | |
| logger.error("Error getting team id (sync b)", error); | |
| return null; | |
| } | |
| } | |
| export const getTeamIdSyncB = withAuth(getTeamIdSyncBOriginal, null); | |