main
Some checks failed
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-04-05 20:37:15 +03:00
parent 9f17ced37d
commit 9486f86cca
22 changed files with 2175 additions and 29 deletions

27
test-curl-standard.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
echo "Logging in..."
LOGIN_RES=$(curl -s -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@contentgen.ai","password":"Admin123!"}')
TOKEN=$(echo $LOGIN_RES | grep -o '"accessToken":"[^"]*' | cut -d'"' -f4)
if [ -z "$TOKEN" ]; then
echo "Login failed!"
exit 1
fi
echo "Creating standard project..."
curl -s -X POST http://localhost:3000/api/projects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"title":"Test Std Project","prompt":"Belgesel","language":"tr","videoStyle":"CINEMATIC","aspectRatio":"PORTRAIT_9_16","targetDuration":60}' > std_res.json
echo "Raw Standard Response:"
cat std_res.json
echo -e "\nListing ALL projects..."
curl -s -X GET "http://localhost:3000/api/projects?limit=5" \
-H "Authorization: Bearer $TOKEN" > list_res.json
echo "Raw List Response:"
cat list_res.json