Ajouter une fonction pour écrire les paramètres de capture dans un fichier camera.txt
This commit is contained in:
@@ -9,9 +9,21 @@ const serverError = require('../utils/serverError');
|
||||
const minInterval = 3; // Minutes
|
||||
//const maxInterval = 60; // Minutes
|
||||
|
||||
const cameraFile = path.join(__dirname, '../storage/camera.txt');
|
||||
|
||||
var captureProjectID = -1;
|
||||
var captureInterval = 0; // Minutes
|
||||
|
||||
function writeCameraFile() {
|
||||
const data = {
|
||||
captureProjectID,
|
||||
captureInterval
|
||||
};
|
||||
fs.writeFileSync
|
||||
(cameraFile, JSON.stringify(data, null, 2), 'utf8');
|
||||
}
|
||||
|
||||
writeCameraFile();
|
||||
|
||||
router.post('/procedure/start/', async (req, res) => {
|
||||
const { projectId, interval } = req.body;
|
||||
|
||||
Reference in New Issue
Block a user