From ca7633ba28ef0607b0705eec68870d1dfcb032d9 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 9 Dec 2016 00:18:54 +0100 Subject: [PATCH] fix migration and logging out --- app/Controllers/AuthController.php | 2 +- database/2016_12_08_205940_remove_faq.php | 2 +- resources/views/yuuno/master.twig | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Controllers/AuthController.php b/app/Controllers/AuthController.php index afb2dc5..c262a25 100644 --- a/app/Controllers/AuthController.php +++ b/app/Controllers/AuthController.php @@ -43,7 +43,7 @@ class AuthController extends Controller public function logout(): string { if (!session_check()) { - return $this->json(['error' => 'Logout failed.']); + return $this->json(['error' => 'Logout failed.', 'a' => $_REQUEST]); } // Destroy the active session diff --git a/database/2016_12_08_205940_remove_faq.php b/database/2016_12_08_205940_remove_faq.php index 5a3efea..dea8771 100644 --- a/database/2016_12_08_205940_remove_faq.php +++ b/database/2016_12_08_205940_remove_faq.php @@ -3,7 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Sakura\DB; -class CacheParsedBbcode extends Migration +class RemoveFaq extends Migration { /** * Run the migrations. diff --git a/resources/views/yuuno/master.twig b/resources/views/yuuno/master.twig index 0e58336..c08c31f 100644 --- a/resources/views/yuuno/master.twig +++ b/resources/views/yuuno/master.twig @@ -133,8 +133,9 @@ var ajax = new Sakura.AJAX; ajax.SetUrl("{{ route('auth.logout') }}"); - ajax.SetFormData({ - "sessions": Sakura.Config.SessionId + ajax.Form(); + ajax.SetSend({ + "session": Sakura.Config.SessionId }); ajax.AddCallback(200, function () {