Semi functional client webUI
- can update client info for sure - Working on notifications now
This commit is contained in:
@@ -15,7 +15,9 @@ router.get('/status', botController.getStatus);
|
||||
*
|
||||
* @param req The request sent from the master
|
||||
* @param req.body.channelId The channel ID to join
|
||||
* @param req.body.clientId The discord Client ID to use when connecting to the server
|
||||
* @param req.body.presetName The name of the preset to start listening to
|
||||
* @param req.body.NGThreshold [OPTIONAL] The noisegate threshold, this will default to 50
|
||||
*/
|
||||
router.post('/join', botController.joinServer);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
// Controllers
|
||||
const { requestCheckIn, getPresets, updatePreset, addNewPreset, removePreset, updateClient } = require("../controllers/clientController");
|
||||
const { requestCheckIn, getPresets, updatePreset, addNewPreset, removePreset, updateClient, updateClientConfigWrapper } = require("../controllers/clientController");
|
||||
|
||||
/** GET Request a check in from the client
|
||||
* Queue the client to check in with the server
|
||||
@@ -11,16 +11,21 @@ const { requestCheckIn, getPresets, updatePreset, addNewPreset, removePreset, up
|
||||
*/
|
||||
router.get('/requestCheckIn', requestCheckIn);
|
||||
|
||||
/** GET Object of all known presets
|
||||
* Query the client to get all the known presets
|
||||
*/
|
||||
router.put('/', );
|
||||
|
||||
/** GET Object of all known presets
|
||||
* Query the client to get all the known presets
|
||||
*/
|
||||
router.get('/presets', getPresets);
|
||||
|
||||
/**
|
||||
* PUT An update to the running client config (not radio config)
|
||||
* @param {number} req.body.id The ID given to the node to update
|
||||
* @param {string} req.body.name The name of the node
|
||||
* @param {string} req.body.ip The IP the server can contact the node on
|
||||
* @param {number} req.body.port The port the server can contact the node on
|
||||
* @param {string} req.body.location The physical location of the node
|
||||
*/
|
||||
router.put('/', updateClientConfigWrapper);
|
||||
|
||||
/** POST Update to preset
|
||||
*
|
||||
* @param req The request sent from the master
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
const { getFullConfig } = require('../utilities/configHandler');
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', function(req, res, next) {
|
||||
res.render('index', { title: 'Express' });
|
||||
router.get('/', async function(req, res, next) {
|
||||
const clientConfig = await getFullConfig();
|
||||
res.render('index', { 'node': clientConfig });
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user