fix(api): align frontend with REST contracts
This commit is contained in:
@@ -18,7 +18,7 @@ import dayjs, { Dayjs } from "dayjs";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import { useNotification } from "@refinedev/core";
|
||||
import { api } from "@/lib/api";
|
||||
import { NETWORK_NAME, config } from "@config/config";
|
||||
import { config } from "@config/config";
|
||||
import { useControllableObjectState } from "@components/olmap/core/useControllableState";
|
||||
import { LeakageResultDetail } from "./types";
|
||||
import { FLOW_DISPLAY_UNIT, toM3s } from "@utils/units";
|
||||
@@ -108,9 +108,8 @@ const AnalysisParameters: React.FC<Props> = ({
|
||||
});
|
||||
try {
|
||||
const response = await api.post(
|
||||
`${config.BACKEND_URL}/api/v1/leakage/identify/`,
|
||||
`${config.BACKEND_URL}/api/v1/leakage-identifications`,
|
||||
{
|
||||
network: NETWORK_NAME,
|
||||
scheme_name: schemeName.trim(),
|
||||
dma_count: dmaCount,
|
||||
scada_start: startTime.toISOString(),
|
||||
|
||||
@@ -85,7 +85,6 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
setLoading(true);
|
||||
try {
|
||||
const params: Record<string, string> = {
|
||||
network: NETWORK_NAME,
|
||||
scheme_type: "dma_leak_identification",
|
||||
};
|
||||
if (!queryAll && queryDate) {
|
||||
@@ -129,7 +128,6 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
`${config.BACKEND_URL}/api/v1/schemes/${encodeURIComponent(schemeName)}`,
|
||||
{
|
||||
params: {
|
||||
network: NETWORK_NAME,
|
||||
scheme_type: "dma_leak_identification",
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user