feat: add package reisntall

This commit is contained in:
engigu
2025-12-24 09:57:12 +08:00
parent 19a2a1adf7
commit e3131e15dc
5 changed files with 104 additions and 5 deletions
+2
View File
@@ -203,6 +203,8 @@ export const api = {
install: (data: { name: string; version?: string; type: string; remark?: string }) =>
request('/deps/install', { method: 'POST', body: JSON.stringify(data) }),
uninstall: (id: number) => request(`/deps/uninstall/${id}`, { method: 'POST' }),
reinstall: (id: number) => request(`/deps/reinstall/${id}`, { method: 'POST' }),
reinstallAll: (type: string) => request(`/deps/reinstall-all?type=${type}`, { method: 'POST' }),
getInstalled: (type: string) => request<Dependency[]>(`/deps/installed?type=${type}`)
}
}