mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
remove route for testing move
This commit is contained in:
@@ -71,49 +71,6 @@ class HouseholdMemberController extends ApiController
|
||||
return $this->json($editor->getHousehold(), Response::HTTP_OK, [], ["groups" => ["read"]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/api/1.0/person/household/members/move/test.{_format}",
|
||||
* name="chill_api_person_household_members_move_test"
|
||||
* )
|
||||
*/
|
||||
public function test(Request $request, $_format): Response
|
||||
{
|
||||
try {
|
||||
$editor = $this->getSerializer()
|
||||
->deserialize($request->getContent(), MembersEditor::class,
|
||||
$_format, ['groups' => [ "read" ]]);
|
||||
} catch (Exception\InvalidArgumentException | Exception\UnexpectedValueException $e) {
|
||||
throw new BadRequestException("Deserialization error: {$e->getMessage()}", 45896, $e);
|
||||
}
|
||||
// TODO ACL
|
||||
//
|
||||
// TODO validation
|
||||
// temporary, to have at least one problem for testing purpose
|
||||
/*$violations = [
|
||||
new \Symfony\Component\Validator\ConstraintViolation(
|
||||
"This is a fake message",
|
||||
null,
|
||||
[],
|
||||
$editor->getHousehold(),
|
||||
'household.members.startDate',
|
||||
new \DateTime('10 years ago')
|
||||
),
|
||||
new \Symfony\Component\Validator\ConstraintViolation(
|
||||
"This is another fake message",
|
||||
null,
|
||||
[],
|
||||
$editor->getHousehold(),
|
||||
'household.members.endDate',
|
||||
new \DateTime('10 years ago')
|
||||
)
|
||||
];
|
||||
$violationsList = new \Symfony\Component\Validator\ConstraintViolationList($violations);
|
||||
*/
|
||||
|
||||
return $this->json($editor->getHousehold(), Response::HTTP_OK, ["groups" => ["read"]]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/person/household/members/editor",
|
||||
|
Reference in New Issue
Block a user