🐛 fix: should add m2m token to use community agents/mcp/skill list (#12708)

fix: should add m2m token to use community agents/mcp/skill list
This commit is contained in:
LiJian
2026-03-05 13:44:56 +08:00
committed by GitHub
parent 1be9c000ec
commit 15a50e999a
2 changed files with 7 additions and 0 deletions

View File

@@ -76,6 +76,8 @@ class DiscoverService {
};
getAssistantList = async (params: AssistantQueryParams = {}): Promise<AssistantListResponse> => {
await this.injectMPToken();
const locale = globalHelpers.getCurrentLanguage();
return lambdaClient.market.getAssistantList.query(
{
@@ -126,6 +128,8 @@ class DiscoverService {
};
getMcpList = async (params: McpQueryParams = {}): Promise<McpListResponse> => {
await this.injectMPToken();
const locale = globalHelpers.getCurrentLanguage();
return lambdaClient.market.getMcpList.query({
...params,

View File

@@ -5,6 +5,7 @@ import {
} from '@lobehub/market-sdk';
import { lambdaClient } from '@/libs/trpc/client';
import { discoverService } from '@/services/discover';
import {
type AgentForkRequest,
type AgentForkResponse,
@@ -241,6 +242,8 @@ export class MarketApiService {
pageSize: number;
total: number;
}> {
await discoverService.injectMPToken();
return lambdaClient.market.skill.searchSkill.query(params);
}