From 2deeb4e538d8501c67125f744c9d96514349bf44 Mon Sep 17 00:00:00 2001 From: Gil Date: Sat, 14 Nov 2020 15:19:55 +0100 Subject: [PATCH] Update ApiTokenController.php Return back with 303 to prevent 405 on the next request --- src/Http/Controllers/Inertia/ApiTokenController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Controllers/Inertia/ApiTokenController.php b/src/Http/Controllers/Inertia/ApiTokenController.php index 49685b5a0..eb5b7f283 100644 --- a/src/Http/Controllers/Inertia/ApiTokenController.php +++ b/src/Http/Controllers/Inertia/ApiTokenController.php @@ -62,7 +62,7 @@ public function update(Request $request, $tokenId) 'abilities' => Jetstream::validPermissions($request->input('permissions', [])), ])->save(); - return back(); + return back(303); } /** @@ -76,6 +76,6 @@ public function destroy(Request $request, $tokenId) { $request->user()->tokens()->where('id', $tokenId)->delete(); - return back(); + return back(303); } }