1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00

fix: Rename timer to stopwatch

Closes #392
This commit is contained in:
Maksim Eltyshev 2023-02-27 19:09:51 +01:00
parent eea57ff121
commit d0a2734161
35 changed files with 179 additions and 161 deletions

View file

@ -14,7 +14,7 @@ const Errors = {
const dueDateValidator = (value) => moment(value, moment.ISO_8601, true).isValid();
const timerValidator = (value) => {
const stopwatchValidator = (value) => {
if (!_.isPlainObject(value) || _.size(value) !== 2) {
return false;
}
@ -57,9 +57,9 @@ module.exports = {
type: 'string',
custom: dueDateValidator,
},
timer: {
stopwatch: {
type: 'json',
custom: timerValidator,
custom: stopwatchValidator,
},
},
@ -95,7 +95,7 @@ module.exports = {
throw Errors.NOT_ENOUGH_RIGHTS;
}
const values = _.pick(inputs, ['position', 'name', 'description', 'dueDate', 'timer']);
const values = _.pick(inputs, ['position', 'name', 'description', 'dueDate', 'stopwatch']);
const card = await sails.helpers.cards.createOne
.with({