From 124439ee3c3d9795895ffbe1f2db7dc27249c07f Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Tue, 21 Apr 2020 18:21:03 +0200 Subject: [PATCH] slug codes and null content --- src/Controller/PollController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/PollController.php b/src/Controller/PollController.php index 4cf9ee5..2f55e54 100644 --- a/src/Controller/PollController.php +++ b/src/Controller/PollController.php @@ -331,8 +331,8 @@ class PollController extends FramadateController { if ( $found ) { if ( ! $elaborated_message_version ) { - return $this->json( true, - 200 ); + return $this->json( 'no-content', + 204 ); } // we should use an other slug @@ -342,10 +342,10 @@ class PollController extends FramadateController { 'slug' => $slug, ], ], - 200 ); + 204 ); } if ( ! $elaborated_message_version ) { - return $this->json( false, + return $this->json( 'NOT_found', 404 ); }