Spaces:
Running
Running
Update admin_routes.py
Browse files- admin_routes.py +5 -5
admin_routes.py
CHANGED
@@ -260,12 +260,12 @@ async def _spark_project_control(action: str, project_name: str, username: str):
|
|
260 |
try:
|
261 |
async with httpx.AsyncClient(timeout=30) as client:
|
262 |
if action == "delete":
|
263 |
-
|
264 |
-
|
265 |
-
f"{spark_endpoint}/project/delete",
|
266 |
-
|
267 |
headers=headers
|
268 |
-
)
|
269 |
else:
|
270 |
response = await client.post(
|
271 |
f"{spark_endpoint}/project/{action}",
|
|
|
260 |
try:
|
261 |
async with httpx.AsyncClient(timeout=30) as client:
|
262 |
if action == "delete":
|
263 |
+
response = await client.request(
|
264 |
+
method="DELETE",
|
265 |
+
url=f"{spark_endpoint}/project/delete",
|
266 |
+
json={"project_name": project_name},
|
267 |
headers=headers
|
268 |
+
)
|
269 |
else:
|
270 |
response = await client.post(
|
271 |
f"{spark_endpoint}/project/{action}",
|