#!/bin/bash

echo "🔍 Быстрая проверка API endpoints"
echo "=================================="

echo ""
echo "📊 Docker контейнеры:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"

echo ""
echo "📊 Прослушиваемые порты:"
netstat -tlnp | grep -E ':(80|443|3000|8000) '

echo ""
echo "🌐 Проверка основных endpoint:"

echo -n "https://links.shareon.kr/ : "
curl -s -o /dev/null -w "%{http_code}" "https://links.shareon.kr/" || echo "ERROR"

echo -n "https://links.shareon.kr/admin/ : "
curl -s -o /dev/null -w "%{http_code}" "https://links.shareon.kr/admin/" || echo "ERROR"

echo -n "https://links.shareon.kr/api/ : "
curl -s -o /dev/null -w "%{http_code}" "https://links.shareon.kr/api/" || echo "ERROR"

echo -n "http://localhost:8000/api/ : "
curl -s -o /dev/null -w "%{http_code}" "http://localhost:8000/api/" || echo "ERROR"

echo -n "http://localhost:3000/ : "
curl -s -o /dev/null -w "%{http_code}" "http://localhost:3000/" || echo "ERROR"

echo ""
echo "✅ Проверка завершена!"