main
Cizz22 6 months ago
parent 9700bbf38d
commit 6336be4a51

@ -15,7 +15,7 @@ router = APIRouter()
@router.get("", response_model=StandardResponse[None])
async def save_all_default(db_session: DbSession, project_name: str = "trialapi"):
async def import_aro(db_session: DbSession, aeros_project_in: AerosProjectInput, project_name: str = "trialapi"):
await import_aro_project(db_session=db_session)
return {"data": None, "status": "success", "message": "Success"}

@ -43,11 +43,23 @@ async def import_aro_project(*, db_session: DbSession):
project_name = "trialapi"
## save File to windows app
# Output is string of file path, examole
# # Example response "C/dsad/dsad.aro"
# try:
# response = await client.post(
# f"{windows_BASE_URL}/upload",
# json=f"/",
# headers={"Content-Type": "application/json"},
# )
# response.raise_for_status()
# except Exception as e:
# raise HTTPException(
# status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)
# )
aro_path = r"C:/Users/user/Documents/Aeros/sample_project.aro"
aeros_project = AerosProject(project_name=project_name, aro_file_path=aro_path)
db_session.add(aeros_project)
await db_session.commit()

Loading…
Cancel
Save