1
0
Fork 0
forked from mirror/pixelfed

Update api routes

This commit is contained in:
Daniel Supernault 2022-08-18 03:48:40 -06:00
parent acd7438013
commit 101676758e
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 5 additions and 1 deletions

View file

@ -311,7 +311,7 @@ class ComposeController extends Controller
public function searchLocation(Request $request) public function searchLocation(Request $request)
{ {
abort_if(!Auth::check(), 403); abort_if(!$request->user(), 403);
$this->validate($request, [ $this->validate($request, [
'q' => 'required|string|max:100' 'q' => 'required|string|max:100'
]); ]);

View file

@ -105,6 +105,10 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
Route::group(['prefix' => 'stories'], function () use($middleware) { Route::group(['prefix' => 'stories'], function () use($middleware) {
Route::get('recent', 'StoryController@recent')->middleware($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) { Route::group(['prefix' => 'live'], function() use($middleware) {