fix: request config
This commit is contained in:
@@ -88,7 +88,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
{
|
||||
timeout: 40000,
|
||||
responseType: 'stream',
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ ${
|
||||
{
|
||||
timeout: 40000,
|
||||
responseType: 'stream',
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
|
||||
const data = await axios
|
||||
.get(url, {
|
||||
httpsAgent: axiosConfig.httpsAgent
|
||||
httpsAgent: axiosConfig().httpsAgent
|
||||
})
|
||||
.then((res) => res.data as string);
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
{
|
||||
timeout: 40000,
|
||||
responseType: isStream ? 'stream' : 'json',
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
},
|
||||
{
|
||||
timeout: 180000,
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
);
|
||||
|
||||
@@ -196,7 +196,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
{
|
||||
timeout: 180000,
|
||||
responseType: isStream ? 'stream' : 'json',
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ ${
|
||||
{
|
||||
timeout: 180000,
|
||||
responseType: isStream ? 'stream' : 'json',
|
||||
...axiosConfig
|
||||
...axiosConfig()
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ const ModelDetail = ({ modelId }: { modelId: string }) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await getModelById(modelId);
|
||||
console.log(res);
|
||||
setModel(res);
|
||||
formHooks.reset(res);
|
||||
} catch (err: any) {
|
||||
|
||||
Reference in New Issue
Block a user