Update ApiV1Controller, add announcements endpoint

This commit is contained in:
Daniel Supernault 2022-03-24 23:00:55 -06:00
parent d40a84533a
commit fbe07c5161
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 14 additions and 0 deletions

View file

@ -2729,4 +2729,17 @@ class ApiV1Controller extends Controller
return $this->json([]); return $this->json([]);
} }
/**
* GET /api/v1/announcements
*
*
* @return array
*/
public function getAnnouncements(Request $request)
{
abort_if(!$request->user(), 403);
return $this->json([]);
}
} }

View file

@ -86,6 +86,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) {
Route::get('preferences', 'Api\ApiV1Controller@getPreferences')->middleware($middleware); Route::get('preferences', 'Api\ApiV1Controller@getPreferences')->middleware($middleware);
Route::get('trends', 'Api\ApiV1Controller@getTrends')->middleware($middleware); Route::get('trends', 'Api\ApiV1Controller@getTrends')->middleware($middleware);
Route::get('announcements', 'Api\ApiV1Controller@getAnnouncements')->middleware($middleware);
}); });
Route::group(['prefix' => 'v2'], function() use($middleware) { Route::group(['prefix' => 'v2'], function() use($middleware) {