Skip to content

A self-hosted media server and file management system

feat: health-check

aminnausin2cb3f503bf06
diff --git a/routes/api.php b/routes/api.php
index d35fe7e0..1cbf2cc1 100755
--- a/routes/api.php
+++ b/routes/api.php
@@ -76,5 +76,10 @@ Route::resource('/folders', FolderController::class)->only(['show']);
Route::resource('/categories', CategoryController::class)->only(['show']);
Route::resource('/playback', PlaybackController::class)->only(['show', 'store']);
+// healthcheck
+Route::get('/health', function () {
+ return response()->json(['health' => 1]);
+});
+
Route::get('/{dir}', [DirectoryController::class, 'showDirectoryAPI']);
Route::get('/{dir}/{folderName}', [DirectoryController::class, 'showDirectoryAPI']);