(req: Request, res: Response)
| 312 | } |
| 313 | |
| 314 | export async function ApiSetAppConfig(req: Request, res: Response) { |
| 315 | try { |
| 316 | const configs = req.body; |
| 317 | const oldConfigs = appConfigManager.getSetupConfig(); |
| 318 | const newConfigs = { |
| 319 | ...oldConfigs, |
| 320 | ...configs |
| 321 | } |
| 322 | appConfigManager.set(CONFIG_KEYS.appSetupConfig, JSON.stringify(newConfigs)); |
| 323 | res.send({ |
| 324 | success: true, |
| 325 | }); |
| 326 | } catch (err: any) { |
| 327 | logger.error(err.message + ":" + err.stack); |
| 328 | res.send({ |
| 329 | success: false, |
| 330 | error: err.message |
| 331 | }); |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | export async function ApiUpdateStableDiffusionConfig(req: Request, res: Response) { |
| 336 | try { |
nothing calls this directly
no test coverage detected