mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 07:39:44 +02:00
Fix variables in update-card, update dependencies. Closes #85
This commit is contained in:
parent
83ad2f45e6
commit
f718464940
8 changed files with 3209 additions and 4332 deletions
|
@ -106,11 +106,10 @@ module.exports = {
|
|||
}
|
||||
|
||||
if (!_.isNil(values.position)) {
|
||||
const cards = await sails.helpers.getCardsForList(
|
||||
values.listId || inputs.record.listId,
|
||||
inputs.record.id,
|
||||
);
|
||||
const boardId = values.boardId || inputs.record.boardId;
|
||||
const listId = values.listId || inputs.record.listId;
|
||||
|
||||
const cards = await sails.helpers.getCardsForList(listId, inputs.record.id);
|
||||
const { position, repositions } = sails.helpers.insertToPositionables(values.position, cards);
|
||||
|
||||
repositions.forEach(async ({ id, position: nextPosition }) => {
|
||||
|
@ -121,7 +120,7 @@ module.exports = {
|
|||
position: nextPosition,
|
||||
});
|
||||
|
||||
sails.sockets.broadcast(`board:${values.boardId || inputs.record.boardId}`, 'cardUpdate', {
|
||||
sails.sockets.broadcast(`board:${boardId}`, 'cardUpdate', {
|
||||
item: {
|
||||
id,
|
||||
position: nextPosition,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue