Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit 442a7b3

Browse files
committed
[fixed] fixed data endpoint
1 parent e73c3bf commit 442a7b3

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55

66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
7+
8+
## [Unreleased]
9+
10+
### Fixed
11+
- fixed data endpoint
12+
713
## [0.0.71] 2023-07-27
814

915
- add GitHub login support

src/services/api/clients.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@ export function getTuxUrl(): string {
3737
}
3838

3939
export function getDataUrl(): string {
40-
return "http://localhost:8080";
41-
// const { BASELIME_DOMAIN = "baselime.io" } = process.env;
42-
// const index = argv.findIndex((val) => val === "--endpoint");
43-
// if (index > -1) {
44-
// const endpoint = argv[index + 1];
45-
// const domain = getDomainWithoutSubdomain(endpoint);
46-
// return `https://data.${domain}`;
47-
// }
48-
// return `https://data.${BASELIME_DOMAIN}`;
40+
const { BASELIME_DOMAIN = "baselime.io" } = process.env;
41+
const index = argv.findIndex((val) => val === "--endpoint");
42+
if (index > -1) {
43+
const endpoint = argv[index + 1];
44+
const domain = getDomainWithoutSubdomain(endpoint);
45+
return `https://data.${domain}`;
46+
}
47+
return `https://data.${BASELIME_DOMAIN}`;
4948
}
5049

5150
export const client = axios.create({

0 commit comments

Comments
 (0)