Spaces:
Runtime error
Runtime error
Download apps/web/src/lib/env.ts from Oheha/cybully-api: direct link, hf CLI and curl.
- Browser
- Download file 621 Bytes
-
https://huggingface.co/spaces/Oheha/cybully-api/resolve/main/apps/web/src/lib/env.ts
- Command line
-
hf download hf://spaces/Oheha/cybully-api/apps/web/src/lib/env.ts
-
curl -L -o env.ts https://huggingface.co/spaces/Oheha/cybully-api/resolve/main/apps/web/src/lib/env.ts
621 Bytes
| import { serverEnv } from "@/lib/server-env"; | |
| export function moderatorEmails(): string[] { | |
| return (serverEnv("MODERATOR_EMAILS") ?? "") | |
| .split(",") | |
| .map((email) => email.trim().toLowerCase()) | |
| .filter(Boolean); | |
| } | |
| export function isModeratorEmail(email?: string | null): boolean { | |
| if (!email) { | |
| return false; | |
| } | |
| return moderatorEmails().includes(email.toLowerCase()); | |
| } | |
| export function apiBaseUrl(): string { | |
| return serverEnv("API_BASE_URL") ?? "http://localhost:8000"; | |
| } | |
| export function backendInternalToken(): string { | |
| return serverEnv("BACKEND_INTERNAL_TOKEN") ?? "dev-internal-token"; | |
| } | |