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

slug codes and null content

This commit is contained in:
Baptiste Lemoine 2020-04-21 18:21:03 +02:00
parent 2c609e2f09
commit 124439ee3c

View File

@ -331,8 +331,8 @@ class PollController extends FramadateController {
if ( $found ) { if ( $found ) {
if ( ! $elaborated_message_version ) { if ( ! $elaborated_message_version ) {
return $this->json( true, return $this->json( 'no-content',
200 ); 204 );
} }
// we should use an other slug // we should use an other slug
@ -342,10 +342,10 @@ class PollController extends FramadateController {
'slug' => $slug, 'slug' => $slug,
], ],
], ],
200 ); 204 );
} }
if ( ! $elaborated_message_version ) { if ( ! $elaborated_message_version ) {
return $this->json( false, return $this->json( 'NOT_found',
404 ); 404 );
} }