refactor(*): 稳定期治理 - 收敛核心架构、错误语义并修复跨项目数据竞态
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { apiClient, request } from "./request";
|
||||
import { http } from "./request";
|
||||
|
||||
export type UpdatePhase =
|
||||
| "idle"
|
||||
@@ -78,17 +78,17 @@ export type SystemUpdateStatus = {
|
||||
};
|
||||
|
||||
export function getSystemUpdateStatus(signal?: AbortSignal) {
|
||||
return request<SystemUpdateStatus>(apiClient.get("/admin/system-update", { signal }));
|
||||
return http.get<SystemUpdateStatus>("/admin/system-update", { signal });
|
||||
}
|
||||
|
||||
export function checkSystemUpdate() {
|
||||
return request<SystemUpdateStatus>(apiClient.post("/admin/system-update/check"));
|
||||
return http.post<SystemUpdateStatus>("/admin/system-update/check");
|
||||
}
|
||||
|
||||
export function startSystemUpdate(targetVersion: string) {
|
||||
return request<SystemUpdateStatus>(apiClient.post("/admin/system-update/start", { targetVersion }));
|
||||
return http.post<SystemUpdateStatus>("/admin/system-update/start", { targetVersion });
|
||||
}
|
||||
|
||||
export function rollbackSystemUpdate(reason: string) {
|
||||
return request<SystemUpdateStatus>(apiClient.post("/admin/system-update/rollback", { reason }));
|
||||
return http.post<SystemUpdateStatus>("/admin/system-update/rollback", { reason });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user