Initial removal of internal discord bot

This commit is contained in:
Logan Cusano
2023-05-18 22:53:25 -04:00
parent 48999e0d63
commit e7b802839e
20 changed files with 176 additions and 758 deletions

View File

@@ -2,22 +2,21 @@
const express = require('express');
const router = express.Router();
// Controllers
const clientController = require("../controllers/clientController");
const {requestCheckIn, getPresets, updatePreset, addNewPreset, removePreset} = require("../controllers/clientController");
/** GET Request a check in from the client
* Queue the client to check in with the server
*
* The status of the checkin request: 200 = Queued
*/
router.get('/requestCheckIn', clientController.requestCheckIn);
router.get('/requestCheckIn', requestCheckIn);
/** GET Object of all known presets
* Query the client to get all the known presets
*/
router.get('/presets', clientController.getPresets);
router.get('/presets', getPresets);
/** POST Update to preset
* Join the channel specified listening to the specified freq/mode
*
* @param req The request sent from the master
* @param {string} req.body.systemName The name of the system to be updated
@@ -25,7 +24,7 @@ router.get('/presets', clientController.getPresets);
* @param {string} req.body.mode The listening mode for the SDR
* @param {string} req.body.trunkFile If the listening mode is digital this can be set to identify the communications
*/
router.post('/updatePreset', clientController.updatePreset);
router.post('/updatePreset', updatePreset);
/** POST Add new preset
* Join the channel specified listening to the specified freq/mode
@@ -36,6 +35,14 @@ router.post('/updatePreset', clientController.updatePreset);
* @param {string} req.body.mode The listening mode for the SDR
* @param {string} req.body.trunkFile If the listening mode is digital this can be set to identify the communications
*/
router.post('/addPreset', clientController.addNewPreset);
router.post('/addPreset', addNewPreset);
/** POST Remove a preset
*
* @param req The request sent from the master
* @param {string} req.body.systemName The name of the system to be updated
*/
router.post('/removePreset', removePreset);
module.exports = router;