#!/bin/bash

# Test if the /posts endpoint returns products

echo "Testing /posts endpoint..."
echo ""

# You'll need to replace TOKEN with your actual JWT token
# Get it from the app or from localStorage/SecureStore

# For now, let's test the public feed first
echo "Testing public feed (/posts/public):"
curl -s "http://localhost:3001/posts/public?limit=5" | jq '.data[] | {type: .type, title: .title, productName: .product.name, images: .product.images}'

echo ""
echo ""
echo "To test authenticated feed, get your JWT token from the app and run:"
echo "curl -H 'Authorization: Bearer YOUR_TOKEN' http://localhost:3001/posts | jq"
