use envvar for base url as well as some other fixes, updating spec (#67)

* use envvar for base url as well as some other fixes, updating spec

* Generated new lib

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Kurt Hutten
2023-02-04 08:42:34 +11:00
committed by GitHub
parent 986da0b51f
commit 6f59c0dfd1
70 changed files with 415 additions and 115 deletions

View File

@ -22,7 +22,8 @@ export default async function create_file_density({
body,
}: Create_file_density_params): Promise<Create_file_density_return> {
const url = `/file/density?material_mass=${material_mass}&src_format=${src_format}`;
const fullUrl = 'https://api.kittycad.io' + url;
const urlBase = process?.env?.BASE_URL || 'https://api.kittycad.io';
const fullUrl = urlBase + url;
const kittycadToken = client
? client.token
: process.env.KITTYCAD_TOKEN || '';