Skip to content

Commit 5da93ff

Browse files
Merge pull request #9 from yepcode/feature/YEP-2933
YEP-2933 Follow-up! Do not allow to configure authUrl
2 parents 854363b + 748f00d commit 5da93ff

4 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/api/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Readable } from "stream";
22

33
export interface YepCodeApiConfig {
4-
authUrl?: string;
54
apiHost?: string;
65
timeout?: number;
76
accessToken?: string;

src/api/yepcodeApi.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export class YepCodeApi {
5555
private apiHost: string;
5656
private clientId?: string;
5757
private clientSecret?: string;
58-
private authUrl: string;
5958
private teamId?: string;
6059
private accessToken?: string;
6160
private timeout: number;
@@ -127,7 +126,6 @@ export class YepCodeApi {
127126
if (!this.teamId) {
128127
this.initTeamId();
129128
}
130-
this.authUrl = finalConfig.authUrl ?? this.getAuthURL();
131129
}
132130

133131
getTeamId(): string {
@@ -174,7 +172,7 @@ export class YepCodeApi {
174172
}
175173

176174
try {
177-
const response = await fetch(this.authUrl, {
175+
const response = await fetch(this.getAuthURL(), {
178176
method: "POST",
179177
headers: {
180178
"x-api-token":

tests/api/yepcodeApi.storage.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const testFilePath = path.join(__dirname, testName);
99
const downloadedFile = path.join(__dirname, "./downloaded_test.json");
1010

1111
const apiHost = process.env.YEPCODE_API_HOST;
12-
const authUrl = process.env.YEPCODE_AUTH_URL;
1312
const apiToken = process.env.YEPCODE_API_TOKEN;
1413

1514
let api: YepCodeApi;
@@ -31,7 +30,7 @@ const verifyDownloadedFile = async (
3130

3231
describe.skip("YepCodeApi", () => {
3332
beforeAll(async () => {
34-
api = new YepCodeApi({ apiHost, authUrl, apiToken });
33+
api = new YepCodeApi({ apiHost, apiToken });
3534
});
3635

3736
afterEach(async () => {

tests/storage/yepcodeStorage.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const testFilePath = path.join(__dirname, testName);
99
const downloadedFile = path.join(__dirname, "./downloaded_test.json");
1010

1111
const apiHost = process.env.YEPCODE_API_HOST;
12-
const authUrl = process.env.YEPCODE_AUTH_URL;
1312
const apiToken = process.env.YEPCODE_API_TOKEN;
1413

1514
let storage: YepCodeStorage;
@@ -31,7 +30,7 @@ const verifyDownloadedFile = async (
3130

3231
describe.skip("YepCodeStorage", () => {
3332
beforeAll(async () => {
34-
storage = new YepCodeStorage({ apiHost, authUrl, apiToken });
33+
storage = new YepCodeStorage({ apiHost, apiToken });
3534
});
3635

3736
afterEach(async () => {

0 commit comments

Comments
 (0)