- Add main application files (main.py, models.py, schemas.py, etc.) - Add routers for all features (waiting, attendance, members, etc.) - Add HTML templates for admin and user interfaces - Add migration scripts and utility files - Add Docker configuration - Add documentation files - Add .gitignore to exclude database and cache files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
39 lines
933 B
Python
39 lines
933 B
Python
|
|
import requests
|
|
|
|
BASE_URL = "http://localhost:8080"
|
|
|
|
def get_token():
|
|
url = f"{BASE_URL}/api/auth/login"
|
|
data = {"username": "superadmin", "password": "superadmin123"}
|
|
resp = requests.post(url, data=data)
|
|
if resp.status_code == 200:
|
|
return resp.json()["access_token"]
|
|
print(f"Login failed: {resp.status_code} {resp.text}")
|
|
return None
|
|
|
|
def test_next_slot():
|
|
token = get_token()
|
|
if not token:
|
|
return
|
|
|
|
url = f"{BASE_URL}/api/waiting/next-slot"
|
|
|
|
headers = {
|
|
"X-Store-Id": "4",
|
|
"Authorization": f"Bearer {token}",
|
|
"Content-Type": "application/json"
|
|
}
|
|
|
|
print(f"Requesting {url} with headers {headers}")
|
|
|
|
try:
|
|
resp = requests.get(url, headers=headers)
|
|
print(f"Status: {resp.status_code}")
|
|
print(f"Body: {resp.text}")
|
|
except Exception as e:
|
|
print(e)
|
|
|
|
if __name__ == "__main__":
|
|
test_next_slot()
|