Skip to content

Commit e13e0a4

Browse files
authored
🐛 hotfix: add the market m2m request into market api (lobehub#12714)
🐛 fix: should add m2m token to use community agents/mcp/skill list (lobehub#12708) fix: should add m2m token to use community agents/mcp/skill list
1 parent 8263359 commit e13e0a4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/services/discover.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ class DiscoverService {
7676
};
7777

7878
getAssistantList = async (params: AssistantQueryParams = {}): Promise<AssistantListResponse> => {
79+
await this.injectMPToken();
80+
7981
const locale = globalHelpers.getCurrentLanguage();
8082
return lambdaClient.market.getAssistantList.query(
8183
{
@@ -126,6 +128,8 @@ class DiscoverService {
126128
};
127129

128130
getMcpList = async (params: McpQueryParams = {}): Promise<McpListResponse> => {
131+
await this.injectMPToken();
132+
129133
const locale = globalHelpers.getCurrentLanguage();
130134
return lambdaClient.market.getMcpList.query({
131135
...params,

src/services/marketApi.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
} from '@lobehub/market-sdk';
66

77
import { lambdaClient } from '@/libs/trpc/client';
8+
import { discoverService } from '@/services/discover';
89
import {
910
type AgentForkRequest,
1011
type AgentForkResponse,
@@ -241,6 +242,8 @@ export class MarketApiService {
241242
pageSize: number;
242243
total: number;
243244
}> {
245+
await discoverService.injectMPToken();
246+
244247
return lambdaClient.market.skill.searchSkill.query(params);
245248
}
246249

0 commit comments

Comments
 (0)