(credential: ResolvedCredential)
| 176 | } |
| 177 | |
| 178 | export function buildAuthHeaders(credential: ResolvedCredential): Record<string, string> { |
| 179 | if (credential.type === "oauth") { |
| 180 | return { authorization: `Bearer ${credential.access_token}` }; |
| 181 | } |
| 182 | return { "x-api-key": credential.key }; |
| 183 | } |
| 184 | |
| 185 | async function safeText(res: Response): Promise<string> { |
| 186 | try { |
no outgoing calls
no test coverage detected