()
| 40 | } |
| 41 | |
| 42 | function getClient(): AxiosInstance { |
| 43 | if (!CERTIFIER_API_TOKEN) { |
| 44 | throw new Error('CERTIFIER_API_TOKEN is not configured'); |
| 45 | } |
| 46 | return axios.create({ |
| 47 | baseURL: CERTIFIER_API_URL, |
| 48 | headers: { |
| 49 | 'Authorization': `Bearer ${CERTIFIER_API_TOKEN}`, |
| 50 | 'Certifier-Version': CERTIFIER_VERSION, |
| 51 | 'Content-Type': 'application/json', |
| 52 | }, |
| 53 | }); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Create, issue, and send a credential in one call. |
no test coverage detected