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

Add an import feature for import Trello board as JSON to Planka

This commit is contained in:
FaustinM 2021-03-25 17:55:36 +01:00
parent a3d1a8a09a
commit a729e11636
24 changed files with 925 additions and 10872 deletions

View file

@ -15,6 +15,10 @@ module.exports = {
type: 'boolean',
defaultsTo: false,
},
withBroadcast: {
type: 'boolean',
defaultsTo: true,
},
},
async fn(inputs, exits) {
@ -25,19 +29,20 @@ module.exports = {
userId: inputs.user.id,
}).fetch();
sails.sockets.broadcast(
`user:${projectMembership.userId}`,
'projectCreate',
{
item: project,
included: {
users: [inputs.user],
projectMemberships: [projectMembership],
boards: [],
if (inputs.withBroadcast)
sails.sockets.broadcast(
`user:${projectMembership.userId}`,
'projectCreate',
{
item: project,
included: {
users: [inputs.user],
projectMemberships: [projectMembership],
boards: [],
},
},
},
inputs.request,
);
inputs.request,
);
return exits.success(
inputs.withProjectMembership