diff --git a/src/controllers/networkController.js b/src/controllers/networkController.js index 48e4eb3..dca56fb 100644 --- a/src/controllers/networkController.js +++ b/src/controllers/networkController.js @@ -446,26 +446,6 @@ exports.member_object = async function(req, res) { } } -// Member authorized POST -exports.member_authorized = async function(req, res) { - const nav = - { - active: 'networks', - whence: '' - } - - const authorized = { authorized: req.body.authorized }; - - try { - const network = await zt.network_detail(req.params.nwid); - const member = await zt.member_object(req.params.nwid, req.params.id, authorized); - nav.whence = '/controller/network/' + network.nwid + '/members'; - res.render('authorized', {title: 'authorized', nav: nav, network: network, member: member}); - } catch (err) { - res.render('authorized', {title: 'authorized', nav: nav, error: 'Error authorizing member ' + req.params.id + ' on network ' + req.params.nwid + ': ' + err}); - } -} - // Easy network setup GET exports.easy_get = async function(req, res) { const nav = diff --git a/src/routes/zt_controller.js b/src/routes/zt_controller.js index aa541e5..3d48607 100644 --- a/src/routes/zt_controller.js +++ b/src/routes/zt_controller.js @@ -58,9 +58,6 @@ router.post('/network/:nwid/member/:id/delete', restrict, networkController.memb // GET request for any member object router.get('/network/:nwid/member/:id/:object', restrict, networkController.member_object); -// POST request for member authorized -router.post('/network/:nwid/member/:id/authorized', restrict, networkController.member_authorized); - // GET request for member detail router.get('/network/:nwid/member/:id', restrict, networkController.member_detail); diff --git a/src/views/authorized.pug b/src/views/authorized.pug deleted file mode 100644 index 9043db1..0000000 --- a/src/views/authorized.pug +++ /dev/null @@ -1,31 +0,0 @@ -//- - ztncui - ZeroTier network controller UI - Copyright (C) 2017-2018 Key Networks (https://key-networks.com) - Licensed under GPLv3 - see LICENSE for details. - -extends network_layout - -block net_content - - h4 for member - a(href='../' + member.address) #{member.address} - - form(method='POST' action='') - .radio - label - input(type='radio' name='authorized' value='true' checked=member.authorized) - | Yes - .radio - label - input(type='radio' name='authorized' value='false' checked=!member.authorized) - | No - - .form-group(style='padding-top: 10px') - button.btn.btn-primary(type='submit') Submit - = ' ' - a.btn.btn-default(href='../' + member.address name='cancel' role='button') Cancel - - if errors - ul - for err in errors - li!= err.msg