28 lines
861 B
Bash
Executable file
28 lines
861 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Test script for the player resolver API endpoint
|
|
# Start the dev server first with: npm run dev
|
|
|
|
echo "Testing Java player resolution..."
|
|
curl -X POST http://localhost:3000/api/resolve-player \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"type": "java", "username": "Notch"}' \
|
|
| jq .
|
|
|
|
echo -e "\nTesting Bedrock player resolution..."
|
|
curl -X POST http://localhost:3000/api/resolve-player \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"type": "bedrock", "username": "TestGamertag"}' \
|
|
| jq .
|
|
|
|
echo -e "\nTesting invalid input..."
|
|
curl -X POST http://localhost:3000/api/resolve-player \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"type": "invalid", "username": ""}' \
|
|
| jq .
|
|
|
|
echo -e "\nTesting missing fields..."
|
|
curl -X POST http://localhost:3000/api/resolve-player \
|
|
-H "Content-Type: application/json" \
|
|
-d '{}' \
|
|
| jq .
|