Spaces:
Building
Building
Update admin_routes.py
Browse files- admin_routes.py +6 -13
admin_routes.py
CHANGED
@@ -259,19 +259,12 @@ async def _spark_project_control(action: str, project_name: str, username: str):
|
|
259 |
|
260 |
try:
|
261 |
async with httpx.AsyncClient(timeout=30) as client:
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
)
|
269 |
-
else:
|
270 |
-
response = await client.post(
|
271 |
-
f"{spark_endpoint}/project/{action}",
|
272 |
-
json={"project_name": project_name},
|
273 |
-
headers=headers
|
274 |
-
)
|
275 |
|
276 |
response.raise_for_status()
|
277 |
return response.json()
|
|
|
259 |
|
260 |
try:
|
261 |
async with httpx.AsyncClient(timeout=30) as client:
|
262 |
+
# Hepsi POST request olarak gönderiliyor
|
263 |
+
response = await client.post(
|
264 |
+
f"{spark_endpoint}/project/{action}",
|
265 |
+
json={"project_name": project_name},
|
266 |
+
headers=headers
|
267 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
response.raise_for_status()
|
270 |
return response.json()
|