<?php
// File: delete_profile_picture.php
require_once 'includes/include_all.inc.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $userId = $_SESSION['front_user_id'];

    if (deleteProfilePicture($userId)) {
        echo json_encode(['success' => true, 'message' => 'Profile picture deleted successfully']);
    } else {
        echo json_encode(['success' => false, 'message' => 'Failed to delete profile picture']);
    }
} else {
    echo json_encode(['success' => false, 'message' => 'Invalid request']);
}
?>