Fix numeric types and missing card id in card detail results
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -33,7 +33,7 @@ class AssignedUsers extends RelationalEntity implements JsonSerializable {
|
||||
|
||||
public function __construct() {
|
||||
$this->addType('id', 'integer');
|
||||
$this->addType('card_id', 'integer');
|
||||
$this->addType('cardId', 'integer');
|
||||
$this->addResolvable('participant');
|
||||
}
|
||||
|
||||
|
||||
@@ -32,5 +32,7 @@ class Label extends RelationalEntity {
|
||||
|
||||
public function __construct() {
|
||||
$this->addType('id', 'integer');
|
||||
$this->addType('boardId', 'integer');
|
||||
$this->addType('cardId', 'integer');
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class LabelMapper extends DeckMapper implements IPermissionMapper {
|
||||
}
|
||||
|
||||
public function findAssignedLabelsForCard($cardId, $limit = null, $offset = null) {
|
||||
$sql = 'SELECT l.* FROM `*PREFIX*deck_assigned_labels` as al INNER JOIN *PREFIX*deck_labels as l ON l.id = al.label_id WHERE `card_id` = ? ORDER BY l.id';
|
||||
$sql = 'SELECT l.*,card_id FROM `*PREFIX*deck_assigned_labels` as al INNER JOIN *PREFIX*deck_labels as l ON l.id = al.label_id WHERE `card_id` = ? ORDER BY l.id';
|
||||
return $this->findEntities($sql, [$cardId], $limit, $offset);
|
||||
}
|
||||
public function findAssignedLabelsForBoard($boardId, $limit = null, $offset = null) {
|
||||
|
||||
Reference in New Issue
Block a user