@myassis/gateway 1.0.73 → 1.0.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/services/dataService.js +3 -24
- package/package.json +1 -1
|
@@ -92,30 +92,9 @@ exports.authService = {
|
|
|
92
92
|
exports.skillsService = {
|
|
93
93
|
list: async (token) => await index_js_1.skillsApi.list(token),
|
|
94
94
|
get: (skillId, token) => index_js_1.skillsApi.get(skillId, token),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (!hubResult.success || !hubResult.data) {
|
|
99
|
-
return { success: false, error: '获取技能详情失败' };
|
|
100
|
-
}
|
|
101
|
-
const hub = hubResult.data;
|
|
102
|
-
// 2. 创建用户技能记录
|
|
103
|
-
const skillData = {
|
|
104
|
-
name: hub.name,
|
|
105
|
-
description: hub.description || '',
|
|
106
|
-
content: hub.content || '',
|
|
107
|
-
icon: hub.icon,
|
|
108
|
-
templateId: skillHubId,
|
|
109
|
-
isActive: true,
|
|
110
|
-
apiKeyRequired: hub.apiKeyRequired || false,
|
|
111
|
-
};
|
|
112
|
-
const response = await index_js_1.skillsApi.create(skillData, token);
|
|
113
|
-
if (response.success) {
|
|
114
|
-
// 3. 增加安装计数
|
|
115
|
-
await index_js_1.skillHubApi.install(skillHubId, token);
|
|
116
|
-
}
|
|
117
|
-
return response;
|
|
118
|
-
},
|
|
95
|
+
// 安装技能:字段由服务端从 skill_hubs 回填,此处不再拼装 body,
|
|
96
|
+
// 防止漏传 scriptsUrl / version 等字段导致入库为空
|
|
97
|
+
install: async (skillHubId, token) => await index_js_1.skillHubApi.install(skillHubId, token),
|
|
119
98
|
update: (skillId, data, token) => index_js_1.skillsApi.update(skillId, data, token),
|
|
120
99
|
uninstall: async (skillId, token) => await index_js_1.skillsApi.uninstall(skillId, token),
|
|
121
100
|
setApiKey: (skillId, apiKey, token) => {
|