settings: move ipv6/ipv4 config into network

this also rename sysinfo_config to ipv4_config
This commit is contained in:
Girish Ramakrishnan
2023-08-03 06:05:29 +05:30
parent f2e56cbdd8
commit 92a103d635
14 changed files with 144 additions and 139 deletions

View File

@@ -296,10 +296,14 @@ async function initializeExpressSync() {
// network routes
router.get ('/api/v1/network/blocklist', token, authorizeOwner, routes.network.getBlocklist);
router.post('/api/v1/network/blocklist', json, token, authorizeOwner, routes.network.setBlocklist);
router.get ('/api/v1/network/trusted_ips', token, authorizeOwner, routes.network.getTrustedIps);
router.post('/api/v1/network/trusted_ips', json, token, authorizeOwner, routes.network.setTrustedIps);
router.get ('/api/v1/network/dynamic_dns', token, authorizeOwner, routes.network.getDynamicDns);
router.post('/api/v1/network/dynamic_dns', json, token, authorizeOwner, routes.network.setDynamicDns);
router.get ('/api/v1/network/trusted_ips', token, authorizeAdmin, routes.network.getTrustedIps);
router.post('/api/v1/network/trusted_ips', json, token, authorizeAdmin, routes.network.setTrustedIps);
router.get ('/api/v1/network/dynamic_dns', token, authorizeAdmin, routes.network.getDynamicDns);
router.post('/api/v1/network/dynamic_dns', json, token, authorizeAdmin, routes.network.setDynamicDns);
router.get ('/api/v1/network/ipv4_config', token, authorizeAdmin, routes.network.getIPv4Config);
router.post('/api/v1/network/ipv4_config', json, token, authorizeAdmin, routes.network.setIPv4Config);
router.get ('/api/v1/network/ipv6_config', token, authorizeAdmin, routes.network.getIPv6Config);
router.post('/api/v1/network/ipv6_config', json, token, authorizeAdmin, routes.network.setIPv6Config);
// settings routes (these are for the settings tab - avatar & name have public routes for normal users. see above)
router.get ('/api/v1/settings/:setting', token, authorizeAdmin, routes.settings.get);