Update an existing pipeline.
(pipeline_id: str, update: PipelineUpdate)
| 48 | |
| 49 | @router.put("/{pipeline_id}", response_model=Pipeline) |
| 50 | async def update_pipeline(pipeline_id: str, update: PipelineUpdate): |
| 51 | """Update an existing pipeline.""" |
| 52 | if pipeline_id not in pipelines_store: |
| 53 | raise HTTPException(status_code=404, detail="Pipeline not found") |
| 54 | |
| 55 | pipeline = pipelines_store[pipeline_id] |
| 56 | |
| 57 | if update.name is not None: |
| 58 | pipeline.name = update.name |
| 59 | if update.description is not None: |
| 60 | pipeline.description = update.description |
| 61 | if update.urls is not None: |
| 62 | pipeline.urls = update.urls |
| 63 | if update.schema is not None: |
| 64 | pipeline.schema = update.schema |
| 65 | if update.code is not None: |
| 66 | pipeline.code = update.code |
| 67 | |
| 68 | pipeline.updated_at = datetime.utcnow() |
| 69 | return pipeline |
| 70 | |
| 71 | @router.delete("/{pipeline_id}") |
| 72 | async def delete_pipeline(pipeline_id: str): |
nothing calls this directly
no outgoing calls
no test coverage detected