Checkpoint React frontend migration

This commit is contained in:
Dwindi Ramadhana
2026-06-20 01:43:39 +07:00
parent ab86c254d1
commit b8e201b45f
173 changed files with 34116 additions and 782 deletions

19
test_api.py Normal file
View File

@@ -0,0 +1,19 @@
import asyncio
import httpx
import json
async def run():
async with httpx.AsyncClient() as client:
# 1. Login
resp = await client.post("http://localhost:8000/api/v1/auth/admin-login", json={"username": "admin", "password": "admin123"})
print("Login resp:", resp.json())
token = resp.json().get("access_token")
# 2. Fetch questions
resp2 = await client.get(
"http://localhost:8000/api/v1/admin/tryouts/132380/questions",
headers={"Authorization": f"Bearer {token}", "X-Website-ID": "1"}
)
print("Questions resp:", json.dumps(resp2.json(), indent=2))
asyncio.run(run())