- added new relativ add millis

This commit is contained in:
Sören Oesterwind 2022-07-14 23:12:18 +02:00
parent a2106f01b1
commit 3ba06013b0
2 changed files with 9 additions and 1 deletions

View File

@ -199,6 +199,14 @@ app.get("/api/v1/set/addMillisToTimer", function (req, res) {
updatedData()
});
app.get("/api/v1/set/relativAddMillisToTimer", function (req, res) {
currentState.timeAmountInital = req.query.time;
currentState.countdownGoal = currentState.countdownGoal + parseInt(req.query.time)
currentState.pauseMoment = new Date().getTime();
res.json({ status: "ok" });
updatedData()
});
app.get("/api/v1/ctrl/timer/pause", function (req, res) {
currentState.timerRunState = false;
currentState.pauseMoment = new Date().getTime();

View File

@ -1,6 +1,6 @@
{
"name": "opencountdown",
"version": "1.0.1",
"version": "1.0.2",
"description": "An opensource countdown",
"main": "index.js",
"scripts": {