From 101676758e76013afddb21f5fd92cbff78065c34 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 18 Aug 2022 03:48:40 -0600 Subject: [PATCH] Update api routes --- app/Http/Controllers/ComposeController.php | 2 +- routes/api.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 4ce4ed03..7bb43e32 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -311,7 +311,7 @@ class ComposeController extends Controller public function searchLocation(Request $request) { - abort_if(!Auth::check(), 403); + abort_if(!$request->user(), 403); $this->validate($request, [ 'q' => 'required|string|max:100' ]); diff --git a/routes/api.php b/routes/api.php index f3d0db24..8e724578 100644 --- a/routes/api.php +++ b/routes/api.php @@ -105,6 +105,10 @@ Route::group(['prefix' => 'api'], function() use($middleware) { Route::group(['prefix' => 'stories'], function () use($middleware) { Route::get('recent', 'StoryController@recent')->middleware($middleware); }); + + Route::group(['prefix' => 'compose/v0'], function () use($middleware) { + Route::get('/search/location', 'ComposeController@searchLocation')->middleware($middleware); + }); }); Route::group(['prefix' => 'live'], function() use($middleware) {