Files
DRB-CnC/Client/routes/client.js
Logan Cusano 4e1b82c557 Init WIP Bot
2022-12-11 06:09:25 -05:00

42 lines
1.7 KiB
JavaScript

// Modules
const express = require('express');
const router = express.Router();
// Controllers
const clientController = 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);
/** GET Object of all known presets
* Query the client to get all the known presets
*/
router.get('/presets', clientController.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
* @param {Array} req.body.frequencies The frequencies array for the channel or channels to be listened to
* @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);
/** POST Add new 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
* @param {Array} req.body.frequencies The frequencies array for the channel or channels to be listened to
* @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);
module.exports = router;