diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 927364c..3ece7ca 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -39,7 +39,6 @@ class Kernel extends HttpKernel ], 'api' => [ - 'throttle:60,1', \App\Http\Middleware\EnforceJson::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, ], diff --git a/routes/api.php b/routes/api.php index d8ee613..f00016f 100644 --- a/routes/api.php +++ b/routes/api.php @@ -15,9 +15,10 @@ // return $request->user(); //}); -Route::get('/checkin/card', 'Api\\CardController@show'); +Route::get('/checkin/card', 'Api\\CardController@show') + ->middleware('throttle:180,1,card'); -Route::middleware(['stateful', 'auth'])->group(function () { +Route::middleware(['throttle:60,1', 'stateful', 'auth'])->group(function () { Route::post('/likes', 'Api\\LikeController@store'); Route::delete('/likes/{id}', 'Api\\LikeController@destroy'); });