Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/api/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Readable } from "stream";

export interface YepCodeApiConfig {
authUrl?: string;
apiHost?: string;
timeout?: number;
accessToken?: string;
Expand Down
4 changes: 1 addition & 3 deletions src/api/yepcodeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class YepCodeApi {
private apiHost: string;
private clientId?: string;
private clientSecret?: string;
private authUrl: string;
private teamId?: string;
private accessToken?: string;
private timeout: number;
Expand Down Expand Up @@ -127,7 +126,6 @@ export class YepCodeApi {
if (!this.teamId) {
this.initTeamId();
}
this.authUrl = finalConfig.authUrl ?? this.getAuthURL();
}

getTeamId(): string {
Expand Down Expand Up @@ -174,7 +172,7 @@ export class YepCodeApi {
}

try {
const response = await fetch(this.authUrl, {
const response = await fetch(this.getAuthURL(), {
method: "POST",
headers: {
"x-api-token":
Expand Down
3 changes: 1 addition & 2 deletions tests/api/yepcodeApi.storage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const testFilePath = path.join(__dirname, testName);
const downloadedFile = path.join(__dirname, "./downloaded_test.json");

const apiHost = process.env.YEPCODE_API_HOST;
const authUrl = process.env.YEPCODE_AUTH_URL;
const apiToken = process.env.YEPCODE_API_TOKEN;

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

describe.skip("YepCodeApi", () => {
beforeAll(async () => {
api = new YepCodeApi({ apiHost, authUrl, apiToken });
api = new YepCodeApi({ apiHost, apiToken });
});

afterEach(async () => {
Expand Down
3 changes: 1 addition & 2 deletions tests/storage/yepcodeStorage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const testFilePath = path.join(__dirname, testName);
const downloadedFile = path.join(__dirname, "./downloaded_test.json");

const apiHost = process.env.YEPCODE_API_HOST;
const authUrl = process.env.YEPCODE_AUTH_URL;
const apiToken = process.env.YEPCODE_API_TOKEN;

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

describe.skip("YepCodeStorage", () => {
beforeAll(async () => {
storage = new YepCodeStorage({ apiHost, authUrl, apiToken });
storage = new YepCodeStorage({ apiHost, apiToken });
});

afterEach(async () => {
Expand Down