<?php
session_start();
require_once '../config/push_config.php';

header('Content-Type: application/json');

if (!isset($_SESSION['user_id'])) {
    http_response_code(401);
    echo json_encode(['success' => false, 'message' => 'Unauthorized']);
    exit();
}

echo json_encode(['publicKey' => VAPID_PUBLIC_KEY]);
?>
