From b18a85a24dd082a0e019c2823c13f0985c30beb9 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Fri, 19 Jul 2024 08:25:55 +0700 Subject: [PATCH] Set post config --- src/controllers/unit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/unit.js b/src/controllers/unit.js index fa99de6..b3bf4ad 100644 --- a/src/controllers/unit.js +++ b/src/controllers/unit.js @@ -36,9 +36,9 @@ export default function () { next(error); } }); - router.post('/config/*', async function (req, res, next) { + router.post('/config', async function (req, res, next) { try { - let result = await unitExec.set("/config" + req.path, JSON.stringify(req.body)); + let result = await unitExec.set(req.path, JSON.stringify(req.body)); res.header("content-type", "application/json") res.status(200).send(result.stdout); } catch (error) {