fase 6 - Controlled Rename Execute API (bevestigde rename op basis van preview) afgerond
This commit is contained in:
@@ -157,3 +157,16 @@ def get_filename_preview(session_id: str = Query("default", min_length=1)):
|
||||
return service.build_filename_preview(normalized_session_id)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc))
|
||||
|
||||
|
||||
@router.post("/rename-execute")
|
||||
def rename_execute(
|
||||
session_id: str = Query("default", min_length=1),
|
||||
confirm: bool = Query(False),
|
||||
):
|
||||
service = SessionService()
|
||||
normalized_session_id = _normalize_session_id(session_id)
|
||||
try:
|
||||
return service.execute_rename(normalized_session_id, confirm=confirm)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc))
|
||||
|
||||
Reference in New Issue
Block a user