Skip to content

Commit a5ec7c6

Browse files
committed
🔨 fix/refactor
1 parent 5e25ad1 commit a5ec7c6

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import { apiRequest } from './lib/apiRequest';
6464

6565
/*eslint-disable */
6666
SchemaManager.prototype.getSchema = function (callback): void {
67-
apiRequest('GET', 'schema.autobot.tf', '/schema')
67+
apiRequest('GET', 'https://schema.autobot.tf/schema')
6868
.then(schema => {
6969
this.setSchema(schema, true);
7070
callback(null, this.schema);

src/lib/apiRequest.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import filterAxiosError from '@tf2autobot/filter-axios-error';
33

44
export async function apiRequest<B>(
55
httpMethod: string,
6-
domain: string,
7-
path: string,
6+
url: string,
87
params?: Record<string, any>,
98
data?: Record<string, any>,
109
headers?: Record<string, unknown>
@@ -15,8 +14,7 @@ export async function apiRequest<B>(
1514

1615
const options: AxiosRequestConfig = {
1716
method: httpMethod as Method,
18-
url: path,
19-
baseURL: domain,
17+
url,
2018
headers: {
2119
'User-Agent': 'TF2Autobot@' + process.env.BOT_VERSION,
2220
...headers

0 commit comments

Comments
 (0)