- 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>
32 lines
934 B
Python
32 lines
934 B
Python
|
|
import requests
|
|
|
|
def test_next_slot():
|
|
url = "http://localhost:8080/api/waiting/next-slot"
|
|
|
|
# We need headers. reception.html uses:
|
|
# headers['X-Store-Id'] = storeId;
|
|
# headers['Authorization'] = `Bearer ${token}`;
|
|
|
|
# Let's try to grab a valid token first?
|
|
# Or assume we can just pass X-Store-Id if the backend allows it (depends on auth implementation)
|
|
# The user is logged in as 'reception'.
|
|
|
|
# Let's try with JUST store id first, seeing 422 might be auth related if Depends(get_current_store) fails?
|
|
# No, Auth failure is 401. 422 is Pydantic.
|
|
|
|
headers = {
|
|
"X-Store-Id": "4",
|
|
"Content-Type": "application/json"
|
|
}
|
|
|
|
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()
|