From 95ed292f4f08a6e54d9c65c084d6ceb1d4e4f0c2 Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 25 Aug 2020 22:07:54 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B2=E3=82=B9=E3=83=88=E3=82=A2=E3=82=AF?= =?UTF-8?q?=E3=82=BB=E3=82=B9=E6=99=82=E3=81=AE=E3=83=AC=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=83=9F=E3=83=83=E3=83=88=E3=82=92=E5=8E=B3=E3=81=97?= =?UTF-8?q?=E3=82=81=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Kernel.php | 2 -- routes/api.php | 12 +++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 0e14fb0..2fe9978 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -48,8 +48,6 @@ class Kernel extends HttpKernel \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \App\Http\Middleware\VerifyCsrfToken::class, - 'throttle:60,1', - 'auth', ] ]; diff --git a/routes/api.php b/routes/api.php index a1b6b6e..d8f3fea 100644 --- a/routes/api.php +++ b/routes/api.php @@ -15,12 +15,14 @@ // return $request->user(); //}); -Route::get('/checkin/card', 'Api\\CardController@show') - ->middleware('throttle:180,1,card'); - Route::middleware('stateful')->group(function () { - Route::post('/likes', 'Api\\LikeController@store'); - Route::delete('/likes/{id}', 'Api\\LikeController@destroy'); + Route::get('/checkin/card', 'Api\\CardController@show') + ->middleware('throttle:30|180,1,card'); + + Route::middleware(['throttle:60,1', 'auth'])->group(function () { + Route::post('/likes', 'Api\\LikeController@store'); + Route::delete('/likes/{id}', 'Api\\LikeController@destroy'); + }); }); Route::post('/webhooks/checkin/{webhook}', 'Api\\WebhookController@checkin')