<?php

require_once __DIR__ . '/controllers/NewsController.php';

try {
    $controller = new NewsController();
    $controller->getNews();
} catch (Exception $e) {
    error_log("API Error in news.php: " . $e->getMessage());

    http_response_code(500);
    echo json_encode([
        'success' => false,
        'message' => 'Internal server error'
    ]);
}
