- added new relativ add millis
This commit is contained in:
parent
a2106f01b1
commit
3ba06013b0
8
index.js
8
index.js
@ -199,6 +199,14 @@ app.get("/api/v1/set/addMillisToTimer", function (req, res) {
|
|||||||
updatedData()
|
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) {
|
app.get("/api/v1/ctrl/timer/pause", function (req, res) {
|
||||||
currentState.timerRunState = false;
|
currentState.timerRunState = false;
|
||||||
currentState.pauseMoment = new Date().getTime();
|
currentState.pauseMoment = new Date().getTime();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "opencountdown",
|
"name": "opencountdown",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "An opensource countdown",
|
"description": "An opensource countdown",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
Reference in New Issue
Block a user