mirror of
https://github.com/plankanban/planka.git
synced 2025-07-24 15:49:46 +02:00
feat(api): allow setting custom fields when creating a card via API (closes #1155)
This commit is contained in:
parent
3126a40bba
commit
ffb9693184
2 changed files with 34 additions and 0 deletions
|
@ -53,6 +53,9 @@ module.exports = {
|
|||
type: 'json',
|
||||
custom: isStopwatch,
|
||||
},
|
||||
customFields: {
|
||||
type: 'ref',
|
||||
},
|
||||
},
|
||||
|
||||
exits: {
|
||||
|
@ -96,6 +99,10 @@ module.exports = {
|
|||
'stopwatch',
|
||||
]);
|
||||
|
||||
if (inputs.customFields) {
|
||||
values.customFields = inputs.customFields;
|
||||
}
|
||||
|
||||
const card = await sails.helpers.cards.createOne
|
||||
.with({
|
||||
project,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue