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

Change id generation algorithm, display notifications total on the main page

This commit is contained in:
Maksim Eltyshev 2019-10-10 02:51:54 +05:00
parent 9ebc82bf22
commit 3848cc194a
86 changed files with 264 additions and 159 deletions

View file

@ -7,11 +7,13 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
beforeId: {
type: 'number'
type: 'string',
regex: /^[0-9]+$/
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
projectId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
position: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
position: {

View file

@ -13,11 +13,13 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
labelId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -10,11 +10,13 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
labelId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -13,11 +13,13 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
userId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -10,11 +10,13 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
userId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -9,7 +9,8 @@ const Errors = {
module.exports = {
inputs: {
listId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
position: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -12,11 +12,13 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
listId: {
type: 'number'
type: 'string',
regex: /^[0-9]+$/
},
position: {
type: 'number'

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
text: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
text: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
boardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
name: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
name: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
boardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
position: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
position: {

View file

@ -13,11 +13,13 @@ const Errors = {
module.exports = {
inputs: {
projectId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
userId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
name: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
cardId: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
name: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
name: {

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -7,7 +7,8 @@ const Errors = {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
},
isAdmin: {

View file

@ -65,7 +65,8 @@ const createReceiver = () => {
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
regex: /^[0-9]+$/,
required: true
}
},

View file

@ -6,7 +6,7 @@ module.exports = {
},
userOrUserId: {
type: 'ref',
custom: value => _.isPlainObject(value) || _.isFinite(value),
custom: value => _.isPlainObject(value) || _.isString(value),
required: true
},
request: {

View file

@ -4,11 +4,11 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
beforeId: {
type: 'number'
type: 'string'
}
},

View file

@ -2,12 +2,12 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
exceptBoardId: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value)
custom: value => _.isString(value) || _.isArray(value)
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,12 +2,12 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
exceptCardId: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value)
custom: value => _.isString(value) || _.isArray(value)
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,12 +2,12 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
exceptListId: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value)
custom: value => _.isString(value) || _.isArray(value)
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
withProjectMemberships: {

View file

@ -2,12 +2,12 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
exceptUserId: {
type: 'number',
custom: value => _.isInteger(value) || _.isArray(value)
type: 'json',
custom: value => _.isString(value) || _.isArray(value)
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,12 +2,12 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
exceptUserId: {
type: 'number',
custom: value => _.isInteger(value) || _.isArray(value)
type: 'json',
custom: value => _.isString(value) || _.isArray(value)
},
withCardSubscriptions: {
type: 'boolean',

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
userId: {

View file

@ -2,12 +2,12 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
},
exceptUserId: {
type: 'number',
custom: value => _.isInteger(value) || _.isArray(value)
type: 'json',
custom: value => _.isString(value) || _.isArray(value)
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
id: {
type: 'json',
custom: value => _.isInteger(value) || _.isArray(value),
custom: value => _.isString(value) || _.isArray(value),
required: true
}
},

View file

@ -2,7 +2,7 @@ module.exports = {
inputs: {
criteria: {
type: 'json',
custom: value => _.isInteger(value) || _.isPlainObject(value),
custom: value => _.isString(value) || _.isPlainObject(value),
required: true
}
},
@ -12,7 +12,7 @@ module.exports = {
deletedAt: null
};
if (_.isInteger(inputs.criteria)) {
if (_.isString(inputs.criteria)) {
criteria.id = inputs.criteria;
} else if (_.isPlainObject(inputs.criteria)) {
Object.assign(criteria, inputs.criteria);

View file

@ -1,6 +1,6 @@
const GAP = 2 ** 14;
const MIN_GAP = 0.125;
const MAX_POSITION = 2 ** 40; // 2 ** 50
const MAX_POSITION = 2 ** 50;
const findBeginnings = positions => {
positions.unshift(0);

View file

@ -1,11 +1,11 @@
module.exports = {
inputs: {
id: {
type: 'number',
type: 'string',
required: true
},
userId: {
type: 'number',
type: 'string',
required: true
}
},

View file

@ -12,7 +12,7 @@ module.exports = function defineCurrentUserHook(sails) {
let id;
try {
id = Number(sails.helpers.verifyToken(accessToken));
id = sails.helpers.verifyToken(accessToken);
} catch (unusedError) {
return;
}

View file

@ -17,7 +17,7 @@ module.exports = {
columnName: 'from_model'
},
originalRecordId: {
type: 'number',
type: 'string',
required: true,
columnName: 'original_record_id'
},