Files
fotospiel-app/app/Http/Controllers/Testing/TestMailboxController.php
Codex Agent 7ea34b3b20
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled
Gate testing API for staging E2E
2026-01-03 15:00:33 +01:00

31 lines
612 B
PHP

<?php
namespace App\Http\Controllers\Testing;
use App\Http\Controllers\Controller;
use App\Testing\Mailbox;
use Illuminate\Http\JsonResponse;
class TestMailboxController extends Controller
{
public function index(): JsonResponse
{
abort_unless(config('e2e.testing_enabled'), 404);
return response()->json([
'data' => Mailbox::all(),
]);
}
public function destroy(): JsonResponse
{
abort_unless(config('e2e.testing_enabled'), 404);
Mailbox::flush();
return response()->json([
'status' => 'ok',
]);
}
}