(bucketPath: string)
| 270 | }; |
| 271 | |
| 272 | export const getBucket = async (bucketPath: string) => { |
| 273 | keepAwake(SLEEP_MINUTES); |
| 274 | |
| 275 | const resp = await fetch(`https://upload.fontsource.org/get/${bucketPath}`, { |
| 276 | headers: { |
| 277 | Authorization: `Bearer ${ |
| 278 | // biome-ignore lint/style/noNonNullAssertion: <explanation> |
| 279 | process.env.UPLOAD_KEY! |
| 280 | }`, |
| 281 | }, |
| 282 | }); |
| 283 | if (!resp.ok) { |
| 284 | handleBucketError(resp, `Unable to fetch ${bucketPath}.`); |
| 285 | } |
| 286 | |
| 287 | return resp; |
| 288 | }; |
no test coverage detected