fix redirect issue

This commit is contained in:
2025-08-31 21:09:28 +03:00
parent b3145714cc
commit 85e6f998f7
4 changed files with 4 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ class Admin:
try:
token = self.page.client_storage.get("token")
headers = {"Authorization": f"Bearer {token}"}
response = requests.get(f"{API_BASE_URL}/admin/subscriptions", headers=headers)
response = requests.get(f"{API_BASE_URL}/admin/subscriptions/", headers=headers)
return response.json() if response.status_code == 200 else []
except Exception as e:
print("Error loading clients:", e)

View File

@@ -91,7 +91,7 @@ class Subscriptions:
try:
token = self.page.client_storage.get("token")
headers = {"Authorization": f"Bearer {token}"}
response = requests.get("{API_BASE_URL}/admin/subscriptions", headers=headers)
response = requests.get("{API_BASE_URL}/admin/subscriptions/", headers=headers)
return response.json() if response.status_code == 200 else []
except Exception as e:
print("Error loading clients:", e)

View File

@@ -990,7 +990,7 @@ class OrdersEditPage:
if not token:
self.message.value = "Unauthorized: No token"
return
response = requests.get(f"{API_BASE_URL}/profile", headers={"Authorization": f"Bearer {token}"})
response = requests.get(f"{API_BASE_URL}/profile/", headers={"Authorization": f"Bearer {token}"})
if response.status_code == 200:
user_data = response.json()
return user_data

View File

@@ -72,7 +72,7 @@ class SendEmail:
def get_user(self):
token = self.page.client_storage.get("token")
headers = {"Authorization": f"Bearer {token}"}
response = requests.get(f"{API_BASE_URL}/profile", headers=headers)
response = requests.get(f"{API_BASE_URL}/profile/", headers=headers)
return response.json() if response.status_code == 200 else None
def get_email_credentials(self):