Skip to content

Commit

Permalink
fix adding user endpoints #37
Browse files Browse the repository at this point in the history
  • Loading branch information
matyaskopp committed Dec 8, 2021
1 parent 0621ffa commit 5843a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/routes/adminRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ router.get('/admin/logmanagement', function (req, res, next) {
router.get('/admin/add-endpoint', function (req, res, next) {
logger.trace(req.query, req.session.user);
let user = req.session.user;
res.render('add-endpoint', {user: user, user_id: req.query.user_id, ip: req.query.ip, start_date: moment(new Date).format('YYYY-MM-DD'), action: '/admin/add-endpoint' });
res.render('add-endpoint', {user: user, user_id: req.query.user_id, ip: req.query.ip, start_date: moment(new Date).format('YYYY-MM-DD'), action: 'new' });
});

router.post('/admin/add-endpoint', function (req, res, next) {
Expand Down
2 changes: 1 addition & 1 deletion app/views/add-endpoint.pug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ block content
strong= message
.divider
.section
form(action=(action || "add-endpoint") method="post" enctype="application/x-www-form-urlencoding")
form(action="admin/add-endpoint" method="post" enctype="application/x-www-form-urlencoding")
.row
.input-field.col.s12
i.material-icons.prefix edit
Expand Down

0 comments on commit 5843a29

Please sign in to comment.