finished uploading image

This commit is contained in:
Penguin-71630
2025-12-12 00:27:45 +08:00
parent 85faf9d2ec
commit 1081d6b07c
15 changed files with 734 additions and 219 deletions

26
tests/ping-post-image.bash Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Check if TOKEN is provided
if [ -z "$TOKEN" ]; then
echo "Error: TOKEN environment variable is required"
echo "Usage: TOKEN=your_token_here ./ping-get-aliases.bash"
exit 1
fi
curl -X POST http://localhost:8080/auth/login \
-H "Content-Type: application/json" \
-d "{\"token\":\"$TOKEN\"}" \
-c cookies.txt \
-v > test.log 2>&1
# Parse refresh_token from cookies.txt
REFRESH_TOKEN=$(grep refresh_token cookies.txt | awk '{print $7}')
curl \
-X POST http://localhost:8080/api/image \
-b "refresh_token=$REFRESH_TOKEN" \
-v \
>> test.log 2>&1
# Display the result
echo "Test completed. Check test.log for details."