Skip to content

Commit

Permalink
Minor cleanup (#116)
Browse files Browse the repository at this point in the history
* Swagger up

* Publish swagger

* API redirect and cleanup
  • Loading branch information
annejan authored Jun 24, 2022
1 parent 26f722c commit 4ad3814
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
[![Codecov](https://codecov.io/gh/badgeteam/Hatchery/branch/master/graph/badge.svg)](https://codecov.io/gh/badgeteam/Hatchery)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbadgeteam%2FHatchery.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbadgeteam%2FHatchery?ref=badge_shield)
[![Known Vulnerabilities](https://snyk.io/test/github/badgeteam/Hatchery/badge.svg)](https://snyk.io/test/github/badgeteam/Hatchery)
[![Github Actions](https://github.com/badgeteam/Hatchery/workflows/Laravel/badge.svg)](https://github.com/badgeteam/Hatchery/actions)

[![Laravel](https://github.com/badgeteam/Hatchery/actions/workflows/laravel.yml/badge.svg)](https://github.com/badgeteam/Hatchery/actions/workflows/laravel.yml)
Simple micropython software repository for Badges.

[Live Site](https://badge.team) \|
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/MchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class MchController extends Controller
*
* @OA\Get(
* path="/mch2022/devices",
* tags={"MCH2022"},
* @OA\Response(response="default",ref="#/components/responses/undocumented")
* )
*
Expand Down
9 changes: 9 additions & 0 deletions app/Http/Controllers/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
use OpenApi\Annotations as OA;
Expand Down Expand Up @@ -466,4 +467,12 @@ function ($query) {
JSON_UNESCAPED_SLASHES
);
}

/**
* @return RedirectResponse
*/
public function api(): RedirectResponse
{
return response()->redirectTo('/api/documentation');
}
}
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
Route::get('badge/{badge}', 'PublicController@badge')->name('badge');
Route::any('search', 'ProjectsController@index')->name('projects.search');

Route::get('api', 'PublicController@api');

Auth::routes();

Route::middleware(['auth'])->group(function () {
Expand Down

0 comments on commit 4ad3814

Please sign in to comment.