Skip to content

Commit c7ef7e8

Browse files
committed
fixes
1 parent 476ae8e commit c7ef7e8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

js/botasaurus-desktop-api/botasaurus-desktop-api-docs/src/app/components/ApiIntegrationComponent/createApiREADME.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function makeAPI(baseUrl, apiBasePath) {
278278
config.push(`apiBasePath: '${apiBasePath}'`)
279279
}
280280

281-
return config.length > 0 ? `new Api({ ${config.join(', ')} })` : 'new Api()'
281+
return config.length > 0 ? `const api = new Api({ ${config.join(', ')} })` : 'const api = new Api()'
282282
}
283283
export function createApiREADME(
284284
baseUrl: string,

js/botasaurus-desktop-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"scripts": {
3939
"dev": "tsc -w",
4040
"build": "rimraf dist tsconfig.tsbuildinfo && tsc && rimraf tsconfig.tsbuildinfo",
41-
"build-mv": "npm run build && mv -f ~/Documents/grow/botasaurus-desktop-api/dist/* ~/Documents/playground/my-project-name/node_modules/botasaurus-desktop-api/dist/",
41+
"build-mv": "npm run build && mv -f ~/Documents/grow/botasaurus/js/botasaurus-desktop-api/dist/* ~/Documents/playground/my-project-name/node_modules/botasaurus-desktop-api/dist/",
4242
"build-dev": "nodemon --watch \"src/**/*.ts\" --exec \"npm run build-mv\"",
4343
"clean": "rimraf dist tsconfig.tsbuildinfo",
4444
"update": "npm update botasaurus",

js/botasaurus-desktop-api/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class Api {
135135
}
136136

137137
private _makeApiUrl(path: string): string {
138-
return `${this._apiUrl}${this._apiBasePath}/${path}`;
138+
return `${this._apiUrl}${this._apiBasePath}${path === '' && this._apiBasePath? "":"/"}${path}`;
139139
}
140140

141141
async isApiRunning(): Promise<boolean> {

0 commit comments

Comments
 (0)