Add protected test game seeding

This commit is contained in:
2026-05-21 19:07:35 -05:00
parent da51e2af24
commit f9cc5f77c8
3 changed files with 28 additions and 24 deletions

View File

@@ -24,6 +24,15 @@ Route::prefix('v1')->middleware(['jwt.auth'])->group(function () {
Route::get('/games/most-played', [GameController::class, 'mostPlayed']);
});
Route::middleware(['jwt.auth'])->post('/dev/seed-games', function () {
app(\Database\Seeders\DatabaseSeeder::class)->run();
return response()->json([
'status' => 'seeded',
'games_count' => DB::table('games')->count(),
]);
});
Route::get('/health', function () {
return response()->json(['status' => 'ok']);
});