Implemented a Zustand-based project_id store, expanded project selection/switching to persist project_id,
and centralized backend requests via api/apiFetch (including data provider updates) to inject X-Project-ID.
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
import { PlayArrow as PlayArrowIcon } from "@mui/icons-material";
|
||||
import { useNotification } from "@refinedev/core";
|
||||
import { useGetIdentity } from "@refinedev/core";
|
||||
import axios from "axios";
|
||||
import { api } from "@/lib/api";
|
||||
import { config, NETWORK_NAME } from "@/config/config";
|
||||
|
||||
type IUser = {
|
||||
@@ -93,7 +93,7 @@ const OptimizationParameters: React.FC = () => {
|
||||
|
||||
try {
|
||||
// 发送优化请求
|
||||
const response = await axios.post(
|
||||
const response = await api.post(
|
||||
`${config.BACKEND_URL}/api/v1/sensorplacementscheme/create`,
|
||||
null,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user