Keep API results the same as before

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2021-11-24 10:08:41 +01:00
committed by backportbot[bot]
parent bc9fe51036
commit a8d41797ef
2 changed files with 32 additions and 5 deletions

View File

@@ -63,6 +63,10 @@ class Board extends RelationalEntity {
if ($this->shared === -1) {
unset($json['shared']);
}
// FIXME: Ideally the API responses should follow the internal data structure and return null if the labels/acls have not been fetched from the db
// however this would be a breaking change for consumers of the API
$json['acl'] = $this->acl ?? [];
$json['labels'] = $this->labels ?? [];
return $json;
}