Skip to content

Commit

Permalink
qaseio: enable using http://api.qase.lo as API host
Browse files Browse the repository at this point in the history
  • Loading branch information
NickVolynkin committed Jul 4, 2024
1 parent f07cfa0 commit 433e24b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions qaseio/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# [email protected]

## What's new

Enable using 'http://api.qase.lo' as API host for Qase development.

# [email protected]

## What's new
Expand Down
2 changes: 1 addition & 1 deletion qaseio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qaseio",
"version": "2.1.4",
"version": "2.1.5",
"description": "Qase TMS Javascript API Client",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
10 changes: 8 additions & 2 deletions qaseio/src/qaseio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,16 @@ export class QaseApi implements QaseApiInterface {
formDataCtor,
});

// default path is https://api.qase.io, defined in
// qaseio/src/generated/base.ts
if (host != undefined) {
if (host == 'qase.io') {
configuration.basePath = `https://api.${host}`;
if (host == 'qase.io' || host == 'api.qase.io' || host == 'https://api.qase.io') {
configuration.basePath = `https://api.qase.io`;
} else if (host == 'http://api.qase.lo') {
// Qase on local machine, development mode
configuration.basePath = host
} else {
// Custom Qase host
configuration.basePath = `https://${host}`;
}
}
Expand Down

0 comments on commit 433e24b

Please sign in to comment.