Skip to content

Commit

Permalink
Merge pull request #28 from wisemen-digital/feature/health-endpoints
Browse files Browse the repository at this point in the history
Update API status endpoint
  • Loading branch information
daanpersoons authored Nov 13, 2024
2 parents ba0d0b2 + 6271ca6 commit 1e096ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.testing
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_NAME=Project Name
APP_NAME=Project-name
APP_ENV=test
APP_KEY=
APP_DEBUG=true
Expand Down
9 changes: 6 additions & 3 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
|
*/

// Health probes routes
Route::get('/', function () {
return response()->json(['message' => 'OK'], 200);
return response()->json([
'environment' => env('APP_ENV'),
'commit' => env('BUILD_COMMIT'),
'version' => env('BUILD_NUMBER'),
'timestamp' => env('BUILD_TIMESTAMP'),
], 200);
});
Route::get('/health', function () {
return response()->json(['message' => 'OK'], 200);
});


Route::middleware(['auth'])->group(function () {
Route::get('/foos', [FooController::class, 'index']);
Route::post('/foos', [FooController::class, 'store']);
Expand Down
Binary file removed tests/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/Setup/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
use MigrateFreshSeedOnce;
use DatabaseTransactions;
use MigrateFreshSeedOnce;
use ValidateDocs;
}

0 comments on commit 1e096ac

Please sign in to comment.