fix: modules

This commit is contained in:
archer
2023-07-18 20:02:51 +08:00
parent a993eba7f0
commit ba73762285
5 changed files with 27 additions and 13 deletions

View File

@@ -615,6 +615,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
await authUser({ req, authRoot: true });
await connectToDatabase();
const { limit = 1000 } = req.body as { limit: number };
// 遍历所有的 app
const apps = await App.find(
{
@@ -623,7 +625,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// userId: '63f9a14228d2a688d8dc9e1b'
},
'_id chat'
);
).limit(limit);
await Promise.all(
apps.map(async (app) => {

View File

@@ -264,7 +264,7 @@ const AppEdit = ({ app, fullScreen, onFullScreen }: Props) => {
setLoaded(true);
onFixView();
},
[onDelConnect, setEdges, setNodes, onChangeNode, onDelNode]
[onDelConnect, setEdges, setNodes, onFixView, onChangeNode, onDelNode]
);
useEffect(() => {