mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
parent
eea57ff121
commit
d0a2734161
35 changed files with 179 additions and 161 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue