From fbe07c5161135c2cc00b216a54977e9c981299a7 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 24 Mar 2022 23:00:55 -0600 Subject: [PATCH] Update ApiV1Controller, add announcements endpoint --- app/Http/Controllers/Api/ApiV1Controller.php | 13 +++++++++++++ routes/api.php | 1 + 2 files changed, 14 insertions(+) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index e5712bb4b..2ad4611e9 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -2729,4 +2729,17 @@ class ApiV1Controller extends Controller return $this->json([]); } + + /** + * GET /api/v1/announcements + * + * + * @return array + */ + public function getAnnouncements(Request $request) + { + abort_if(!$request->user(), 403); + + return $this->json([]); + } } diff --git a/routes/api.php b/routes/api.php index 823b186a0..8626a7189 100644 --- a/routes/api.php +++ b/routes/api.php @@ -86,6 +86,7 @@ Route::group(['prefix' => 'api'], function() use($middleware) { Route::get('preferences', 'Api\ApiV1Controller@getPreferences')->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) {