Skip to content

Commit bcae51e

Browse files
committed
address comments
1 parent 5a32f46 commit bcae51e

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/apify-client.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,11 @@ export function getApifyAPIBaseUrl(): string {
2929
* @param authToken
3030
* @private
3131
*/
32-
function addSkyfireHeader(config: AxiosRequestConfig, authToken?: AuthToken): AxiosRequestConfig {
33-
if (authToken?.type === 'skyfire') {
34-
const updatedConfig = { ...config };
35-
updatedConfig.headers = updatedConfig.headers ?? {};
36-
updatedConfig.headers['skyfire-pay-id'] = authToken.value;
37-
return updatedConfig;
38-
}
39-
return config;
32+
function addSkyfireHeader(config: AxiosRequestConfig, authToken: AuthToken): AxiosRequestConfig {
33+
const updatedConfig = { ...config };
34+
updatedConfig.headers = updatedConfig.headers ?? {};
35+
updatedConfig.headers['skyfire-pay-id'] = authToken.value;
36+
return updatedConfig;
4037
}
4138

4239
export class ApifyClient extends _ApifyClient {

src/mcp/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class ActorsMcpServer {
158158
* Loads missing toolNames from a provided list of tool names.
159159
* Skips toolNames that are already loaded and loads only the missing ones.
160160
* @param toolNames - Array of tool names to ensure are loaded
161-
* @param apifyToken - Apify API token for authentication
161+
* @param authToken - Token for Apify service authentication
162162
*/
163163
public async loadToolsByName(toolNames: string[], authToken: AuthToken) {
164164
const loadedTools = this.listAllToolNames();
@@ -193,7 +193,7 @@ export class ActorsMcpServer {
193193
* Load actors as tools, upsert them to the server, and return the tool entries.
194194
* This is a public method that wraps getActorsAsTools and handles the upsert operation.
195195
* @param actorIdsOrNames - Array of actor IDs or names to load as tools
196-
* @param apifyToken - Apify API token for authentication
196+
* @param authToken - Token for Apify service authentication
197197
* @returns Promise<ToolEntry[]> - Array of loaded tool entries
198198
*/
199199
public async loadActorsAsTools(actorIdsOrNames: string[], authToken: AuthToken): Promise<ToolEntry[]> {

0 commit comments

Comments
 (0)