fix(api): align frontend with REST contracts

This commit is contained in:
2026-07-30 20:38:52 +08:00
parent b57e58ff87
commit 782363cfb6
65 changed files with 99362 additions and 318 deletions
@@ -228,7 +228,6 @@ const SchemeQuery: React.FC<Props> = ({
setLoading(true);
try {
const params: Record<string, string> = {
network: NETWORK_NAME,
scheme_type: "burst_location",
};
if (!queryAll && queryDate) {
@@ -238,7 +237,7 @@ const SchemeQuery: React.FC<Props> = ({
const [response, simulationResponse] = await Promise.all([
api.get(`${config.BACKEND_URL}/api/v1/schemes`, { params }),
api.get(`${config.BACKEND_URL}/api/v1/schemes`, {
params: { network: NETWORK_NAME, scheme_type: "burst_analysis" },
params: { scheme_type: "burst_analysis" },
}),
]);
const nextSchemes = response.data as BurstSchemeRecord[];
@@ -281,7 +280,7 @@ const SchemeQuery: React.FC<Props> = ({
try {
const response = await api.get(
`${config.BACKEND_URL}/api/v1/schemes/${encodeURIComponent(schemeName)}`,
{ params: { network: NETWORK_NAME, scheme_type: "burst_location" } },
{ params: { scheme_type: "burst_location" } },
);
const schemeRecord = response.data as BurstSchemeRecord & {
result_payload?: BurstLocationResult;