1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00

admin key and found owner token

This commit is contained in:
Baptiste Lemoine 2020-01-24 12:08:39 +01:00
parent 69ccb84832
commit bead44c6bd

View File

@ -213,10 +213,11 @@ class DefaultController extends AbstractController {
}
return $this->json( [
'message' => 'you created a poll ' . $precision,
'data' => $newpoll,
'password_protected' => is_string( $newpoll->getPassword() ),
'admin_key' => $newpoll->getAdminKey(),
'message' => 'you created a poll ' . $precision,
'data' => $newpoll,
'password_protected' => is_string( $newpoll->getPassword() ),
'admin_key' => $newpoll->getAdminKey(),
'owner_modifier_token' => $foundOwner->getModifierToken(),
],
201 );
@ -541,7 +542,7 @@ class DefaultController extends AbstractController {
'vote_stack' => $stack->display(),
'vote_count' => count( $poll->getStacksOfVotes() ),
'owner_modifier_token' => $foundOwner->getModifierToken(),
'admin_token' => $poll->getAdminKey(),
'admin_key' => $poll->getAdminKey(),
'json_you_sent' => $data,
],
201 );