<?php
require_once 'utils/response.php';
require_once 'config/database.php';
require_once 'services/MailService.php';
require_once 'controllers/AuthController.php';

// Mock getJsonBody for testing
function getJsonBody() {
    return ['email' => 'test@example.com'];
}

// Ensure user exists for testing
$db = getDb();
$db->query("INSERT IGNORE INTO users (name, email, password) VALUES ('Test User', 'test@example.com', 'password123')");

echo "Triggering forgotPassword...\n";
AuthController::forgotPassword();
echo "\nDone. Check storage/logs/mail.log\n";
