From cb01548f2928e02496134ea97f0cc945613a9e32 Mon Sep 17 00:00:00 2001 From: xinnige Date: Sun, 29 Sep 2024 15:57:08 +0800 Subject: [PATCH] Add resp ncid --- service/routes/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/routes/config.js b/service/routes/config.js index 462612b9..7b2be30a 100644 --- a/service/routes/config.js +++ b/service/routes/config.js @@ -298,7 +298,7 @@ router.post('/set', inTransaction = false; currentTransID = null; log.info("Commit config change transaction: " + JSON.stringify(newConfig)); - res.status(200).json({errors: []}); + res.status(200).json({errors: [], "ncid": newConfig.ncid || ""}); return; case T_OP_REVERT: // previous persisted config will be applied in the code below @@ -354,7 +354,7 @@ router.post('/set', log.info("New ncid generated", newConfig.ncid); await ncm.saveConfig(newConfig, inTransaction); - res.status(200).json({errors: errors}); + res.status(200).json({errors: errors, "ncid": newConfig.ncid}); } } } catch (err) {