fix: correct variable name in canModifyAbsenceInPast method
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2025-01-08 18:30:33 +01:00
parent b12c3bb72f
commit 50a95ed3c4
1 changed files with 3 additions and 3 deletions

View File

@ -28,9 +28,9 @@ module.exports = Self => {
Self.canModifyAbsenceInPast = async(ctx, time) => {
const hasPrivs = await Self.app.models.ACL.checkAccessAcl(ctx, 'Worker', 'canModifyAbsenceInPast', 'WRITE');
const now = Date.vnNew();
now.setHours(0, 0, 0, 0);
return hasPrivs || now.getTime() < time;
const today = Date.vnNew();
today.setHours(0, 0, 0, 0);
return hasPrivs || today.getTime() < time;
};
async function tinIsValid(err, done) {