generated from ludops/ludops-skeleton
Update apps/api/src/index.ts
Build and Deploy / build-and-push (push) Successful in 1m9s
Details
Build and Deploy / build-and-push (push) Successful in 1m9s
Details
This commit is contained in:
parent
afb1a8719b
commit
7c8ca81560
|
|
@ -52,8 +52,8 @@ fastify.post<{ Body: { name: string; doesRepeat: boolean; repeatsEvery?: string;
|
||||||
// next due = today: set lastCompletedOn = now - interval
|
// next due = today: set lastCompletedOn = now - interval
|
||||||
lastCompletedOn = new Date(Date.now() - msInterval);
|
lastCompletedOn = new Date(Date.now() - msInterval);
|
||||||
} else {
|
} else {
|
||||||
// next due = tomorrow: set lastCompletedOn = now - interval + 1 day
|
// next due = now + interval: set lastCompletedOn = now
|
||||||
lastCompletedOn = new Date(Date.now() - msInterval + 24 * 60 * 60 * 1000);
|
lastCompletedOn = new Date();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue