Skip to content

Commit

Permalink
Set post config
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jul 19, 2024
1 parent 18c473f commit b18a85a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b18a85a

Please sign in to comment.