diff options
Diffstat (limited to 'packages/auth-apikey/src/resolver.ts')
| -rw-r--r-- | packages/auth-apikey/src/resolver.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/auth-apikey/src/resolver.ts b/packages/auth-apikey/src/resolver.ts index 2e63a1c..a90c45e 100644 --- a/packages/auth-apikey/src/resolver.ts +++ b/packages/auth-apikey/src/resolver.ts @@ -3,12 +3,12 @@ import type { ApiKeyCredentials } from "@dispatch/kernel"; const DEFAULT_BASE_URL = "https://opencode.ai/zen/go/v1"; export function resolveApiKeyCredentials( - env: Readonly<Record<string, string | undefined>>, + env: Readonly<Record<string, string | undefined>>, ): ApiKeyCredentials { - const apiKey = env.DISPATCH_API_KEY; - if (!apiKey) { - throw new Error("DISPATCH_API_KEY is not set. Set it in your environment or .env file."); - } - const baseURL = env.DISPATCH_BASE_URL ?? DEFAULT_BASE_URL; - return { type: "api-key", apiKey, baseURL }; + const apiKey = env.DISPATCH_API_KEY; + if (!apiKey) { + throw new Error("DISPATCH_API_KEY is not set. Set it in your environment or .env file."); + } + const baseURL = env.DISPATCH_BASE_URL ?? DEFAULT_BASE_URL; + return { type: "api-key", apiKey, baseURL }; } |
