mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 07:19:49 +00:00
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* Chill is a software for social workers
|
|
*
|
|
* For the full copyright and license information, please view
|
|
* the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Chill\MainBundle\Controller;
|
|
|
|
use Chill\MainBundle\Entity\User;
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
class DashboardApiController
|
|
{
|
|
/**
|
|
* Get user dashboard config (not yet based on user id and still hardcoded for now).
|
|
*
|
|
* @Route("/api/1.0/main/dashboard-config-item.json", methods={"get"})
|
|
*/
|
|
public function getDashboardConfiguration(): JsonResponse
|
|
{
|
|
$data = [
|
|
[
|
|
'position' => 'top-left',
|
|
'id' => 1,
|
|
'type' => 'news',
|
|
'metadata' => [
|
|
// arbitrary data that will be store "some time"
|
|
'only_unread' => false,
|
|
],
|
|
],
|
|
];
|
|
|
|
return new JsonResponse($data, JsonResponse::HTTP_OK, []);
|
|
}
|
|
}
|