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

Prepare for collection board type, refactoring, update dependencies

This commit is contained in:
Maksim Eltyshev 2020-08-04 01:32:46 +05:00
parent 402645bc99
commit 30ed77af59
190 changed files with 2144 additions and 1817 deletions

View file

@ -9,12 +9,25 @@ module.exports = {
},
values: {
type: 'json',
custom: (value) =>
_.isPlainObject(value) &&
(_.isUndefined(value.background) ||
_.isNull(value.background) ||
_.isPlainObject(value.background)) &&
(_.isUndefined(value.backgroundImage) || _.isNull(value.backgroundImage)),
custom: (value) => {
if (!_.isPlainObject(value)) {
return false;
}
if (
!_.isUndefined(value.background) &&
!_.isNull(value.background) &&
!_.isPlainObject(value.background)
) {
return false;
}
if (!_.isUndefined(value.backgroundImage) && !_.isNull(value.backgroundImage)) {
return false;
}
return true;
},
required: true,
},
request: {
@ -23,7 +36,7 @@ module.exports = {
},
exits: {
invalidParams: {},
backgroundImageDirnameMustBeNotNullInValues: {},
},
async fn(inputs, exits) {
@ -50,7 +63,7 @@ module.exports = {
let project;
if (inputs.values.background && inputs.values.background.type === 'image') {
if (_.isNull(inputs.values.backgroundImageDirname)) {
throw 'invalidParams';
throw 'backgroundImageDirnameMustBeNotNullInValues';
}
if (_.isUndefined(inputs.values.backgroundImageDirname)) {