diff --git a/index.js b/index.js index ca6485b..dc89809 100644 --- a/index.js +++ b/index.js @@ -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(); diff --git a/package.json b/package.json index 3f07d89..eaec627 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opencountdown", - "version": "1.0.1", + "version": "1.0.2", "description": "An opensource countdown", "main": "index.js", "scripts": {