fix: 修复前端编译 TS 错误

- App 类型补充 is_favorited?: boolean 字段
- platform/providers 页面 testConnection mutationFn 补充泛型参数
This commit is contained in:
selfrelease
2026-06-23 11:33:19 +08:00
parent 65dc805eb5
commit 6ca1c27162
5 changed files with 115 additions and 124 deletions
@@ -157,7 +157,7 @@ export default function AppDetailPage() {
const CategoryIcon = getCategoryIcon(app.category_slug);
const categoryColor = getCategoryColor(app.category_slug);
const isFavorited = (app as any).is_favorited;
const isFavorited = app.is_favorited;
const typeConfig = getAppTypeConfig(app.dify_app_type);
const TypeIcon = typeConfig.icon;
+5 -2
View File
@@ -128,8 +128,11 @@ export default function PlatformProvidersPage() {
});
const testConnection = useMutation({
mutationFn: (id: string) => api.post(`/api/v1/platform/providers/${id}/test`),
onSuccess: (data: any) => {
mutationFn: (id: string) =>
api.post<{ success: boolean; message?: string; response?: string }>(
`/api/v1/platform/providers/${id}/test`
),
onSuccess: (data) => {
if (data.success) {
toast.success("连接测试成功", {
description: data.response || "Provider 响应正常",