mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 05:09:43 +02:00
27 lines
484 B
JavaScript
Executable file
27 lines
484 B
JavaScript
Executable file
module.exports = {
|
|
inputs: {
|
|
name: {
|
|
type: 'string',
|
|
required: true,
|
|
},
|
|
},
|
|
|
|
async fn(inputs) {
|
|
const { currentUser } = this.req;
|
|
|
|
const values = _.pick(inputs, ['name']);
|
|
|
|
const { project, projectManager } = await sails.helpers.projects.createOne.with({
|
|
values,
|
|
user: currentUser,
|
|
request: this.req,
|
|
});
|
|
|
|
return {
|
|
item: project,
|
|
included: {
|
|
projectManagers: [projectManager],
|
|
},
|
|
};
|
|
},
|
|
};
|