mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
Project managers, board members, auto-update after reconnection, refactoring
This commit is contained in:
parent
7956503a46
commit
fe91b5241e
478 changed files with 21226 additions and 19495 deletions
|
@ -6,25 +6,22 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
|
||||
async fn(inputs, exits) {
|
||||
async fn(inputs) {
|
||||
const { currentUser } = this.req;
|
||||
|
||||
const values = _.pick(inputs, ['name']);
|
||||
|
||||
const { project, projectMembership } = await sails.helpers.createProject(
|
||||
currentUser,
|
||||
const { project, projectManager } = await sails.helpers.projects.createOne(
|
||||
values,
|
||||
currentUser,
|
||||
this.req,
|
||||
true,
|
||||
);
|
||||
|
||||
return exits.success({
|
||||
return {
|
||||
item: project,
|
||||
included: {
|
||||
users: [currentUser],
|
||||
projectMemberships: [projectMembership],
|
||||
boards: [],
|
||||
projectManagers: [projectManager],
|
||||
},
|
||||
});
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue