DrSmoothl
|
dc7e037582
|
refactor(dashboard): migrate plugin-api HTTP functions to ApiResponse pattern
- Migrate 14 HTTP functions in plugin-api.ts to return ApiResponse<T>
- fetchPluginList, checkGitStatus, getMaimaiVersion
- getInstalledPlugins, installPlugin, uninstallPlugin, updatePlugin
- getPluginConfigSchema, getPluginConfig, getPluginConfigRaw
- updatePluginConfig, updatePluginConfigRaw, resetPluginConfig, togglePlugin
- Update 3 caller files to handle ApiResponse pattern:
- plugins.tsx: 5 function calls updated
- plugin-config.tsx: 5 function calls updated
- plugin-detail.tsx: 5 function calls updated
- All callers now check .success before accessing .data
- Preserve WebSocket and utility functions unchanged
- Build verification: npm run build succeeds with 0 errors
|
2026-03-01 18:06:25 +08:00 |
|