Add medias link to mms into received + sended + scheduled + discussion

This commit is contained in:
osaajani 2021-03-21 18:29:23 +01:00
parent 70d01be041
commit f330312b55
8 changed files with 122 additions and 10 deletions

View file

@ -56,6 +56,13 @@ namespace controllers\publics;
public function list_json()
{
$entities = $this->internal_scheduled->list_for_user($_SESSION['user']['id']);
foreach ($entities as &$entity)
{
if ($entity['mms'])
{
$entity['medias'] = $this->internal_media->gets_for_scheduled($entity['id']);
}
}
header('Content-Type: application/json');
echo json_encode(['data' => $entities]);