mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
update controller not to extend apiController and make some changes in repository + serializer
This commit is contained in:
@@ -19,17 +19,11 @@ class DashboardApiController
|
||||
{
|
||||
}
|
||||
|
||||
public function indexApi()
|
||||
{
|
||||
return $this->getDashboardConfiguration();
|
||||
}
|
||||
|
||||
// I dont understand why this method is needed, but if I do a cache clear without this method present, he gives an error saying it needs to be present.
|
||||
public function setCrudConfig()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
@@ -44,7 +38,7 @@ class DashboardApiController
|
||||
]
|
||||
];
|
||||
|
||||
return new JsonResponse($data);
|
||||
return new JsonResponse($data, JsonResponse::HTTP_OK, []);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user