1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00
This commit is contained in:
Kayn Ty 2020-01-24 11:15:34 +00:00
commit a17967c1f6

View File

@ -39,7 +39,7 @@ class DefaultController extends AbstractController {
public function showMyPollsAction() {
return $this->json( [
'message' => 'here are your polls',
'data' => new Poll(),
'poll' => new Poll(),
] );
}
@ -56,7 +56,7 @@ class DefaultController extends AbstractController {
return $this->json( [
'message' => 'here are your polls',
'data' => $data,
'poll' => $data,
],
200 );
}
@ -214,7 +214,7 @@ class DefaultController extends AbstractController {
return $this->json( [
'message' => 'you created a poll ' . $precision,
'data' => $newpoll,
'poll' => $newpoll,
'password_protected' => is_string( $newpoll->getPassword() ),
'admin_key' => $newpoll->getAdminKey(),
'owner_modifier_token' => $foundOwner->getModifierToken(),
@ -272,7 +272,7 @@ class DefaultController extends AbstractController {
}
$returnedPoll = [
'message' => 'your poll config',
'data' => $poll,
'poll' => $poll,
'stacks_count' => count( $poll->getStacksOfVotes() ),
'stacks' => $stacks,
'choices_count' => count( $poll->getChoices() ),