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:
parent
a3d1a8a09a
commit
a729e11636
24 changed files with 925 additions and 10872 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue