Fix jwt-token
This commit is contained in:
@@ -48,16 +48,17 @@ def authenticate():
|
||||
|
||||
try:
|
||||
print(f"🔐 Authenticating as user: {USERNAME}")
|
||||
response = requests.post(f"{API_BASE_URL}/auth/login", json=login_data, verify=False)
|
||||
response = requests.post(f"{API_BASE_URL}/users/login", json=login_data, verify=False)
|
||||
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
AUTH_TOKEN = data.get('token')
|
||||
AUTH_TOKEN = data.get('data', {}).get('token')
|
||||
if AUTH_TOKEN:
|
||||
print("✅ Authentication successful")
|
||||
return True
|
||||
else:
|
||||
print("❌ No token received in response")
|
||||
print(f"Response data: {data}")
|
||||
return False
|
||||
else:
|
||||
print(f"❌ Authentication failed: {response.status_code}")
|
||||
|
||||
Reference in New Issue
Block a user