feat: create new card from smart picker
Signed-off-by: Luka Trovic <luka@nextcloud.com>
This commit is contained in:
committed by
backportbot-nextcloud[bot]
parent
4d10663406
commit
1cd5f2f496
@@ -81,8 +81,17 @@ class CardApiController extends ApiController {
|
||||
*
|
||||
* Get a specific card.
|
||||
*/
|
||||
public function create($title, $type = 'plain', $order = 999, $description = '', $duedate = null) {
|
||||
public function create($title, $type = 'plain', $order = 999, $description = '', $duedate = null, $labels = [], $users = []) {
|
||||
$card = $this->cardService->create($title, $this->request->getParam('stackId'), $type, $order, $this->userId, $description, $duedate);
|
||||
|
||||
foreach ($labels as $labelId) {
|
||||
$this->cardService->assignLabel($card->id, $labelId);
|
||||
}
|
||||
|
||||
foreach ($users as $user) {
|
||||
$this->assignmentService->assignUser($card->id, $user['id'], $user['type']);
|
||||
}
|
||||
|
||||
return new DataResponse($card, HTTP::STATUS_OK);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user