MCPcopy Create free account
hub / github.com/6174/comflowyspace / ApiSetRunConfig

Function ApiSetRunConfig

apps/node/src/routes/api/bootstrap.ts:287–312  ·  view source on GitHub ↗
(req: Request, res: Response)

Source from the content-addressed store, hash-verified

285}
286
287export async function ApiSetRunConfig(req: Request, res: Response) {
288 try {
289 const configs = req.body;
290 const restart = req.query.restart === "true";
291 console.log("restart", req.query.restart, restart);
292 let runMode = appConfigManager.getRunConfig();
293 appConfigManager.set(CONFIG_KEYS.runConfig, JSON.stringify({
294 ...runMode,
295 ...configs
296 }));
297
298 if (restart) {
299 await comfyuiService.restartComfyUI();
300 }
301
302 res.send({
303 success: true,
304 });
305 } catch (err: any) {
306 logger.error(err.message + ":" + err.stack);
307 res.send({
308 success: false,
309 error: err.message
310 })
311 }
312}
313
314export async function ApiSetAppConfig(req: Request, res: Response) {
315 try {

Callers

nothing calls this directly

Calls 4

logMethod · 0.80
getRunConfigMethod · 0.80
restartComfyUIMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected