mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
30 lines
550 B
JavaScript
Executable file
30 lines
550 B
JavaScript
Executable file
module.exports = {
|
|
inputs: {
|
|
name: {
|
|
type: 'string',
|
|
required: true,
|
|
},
|
|
},
|
|
|
|
async fn(inputs, exits) {
|
|
const { currentUser } = this.req;
|
|
|
|
const values = _.pick(inputs, ['name']);
|
|
|
|
const { project, projectMembership } = await sails.helpers.createProject(
|
|
currentUser,
|
|
values,
|
|
this.req,
|
|
true,
|
|
);
|
|
|
|
return exits.success({
|
|
item: project,
|
|
included: {
|
|
users: [currentUser],
|
|
projectMemberships: [projectMembership],
|
|
boards: [],
|
|
},
|
|
});
|
|
},
|
|
};
|