<?php
require_once 'config/database.php';

$correct_api_key = '73765654368fafdf094aa6841252168132430908268fafdf094aa82125124609';

$stmt = $pdo->prepare("UPDATE settings SET setting_value = ? WHERE setting_key = 'zashof_api_key'");
$stmt->execute([$correct_api_key]);

echo "API key updated directly in database\n";

// Verify the update
$stmt = $pdo->prepare("SELECT setting_value FROM settings WHERE setting_key = 'zashof_api_key'");
$stmt->execute();
$result = $stmt->fetch();

echo "Updated API Key: " . (strlen($result['setting_value']) > 20 ? substr($result['setting_value'], 0, 10) . '...' . substr($result['setting_value'], -10) : $result['setting_value']) . "\n";
echo "Length: " . strlen($result['setting_value']) . " characters\n";
?>