| 401 | } |
| 402 | |
| 403 | async fn delete_http_integration( |
| 404 | &self, |
| 405 | request: Request<api::DeleteHttpIntegrationRequest>, |
| 406 | ) -> Result<Response<()>, Status> { |
| 407 | let req = request.get_ref(); |
| 408 | let app_id = Uuid::from_str(&req.application_id).map_err(|e| e.status())?; |
| 409 | |
| 410 | self.validator |
| 411 | .validate( |
| 412 | request.extensions(), |
| 413 | validator::ValidateApplicationAccess::new(validator::Flag::Update, app_id), |
| 414 | ) |
| 415 | .await?; |
| 416 | |
| 417 | application::delete_integration(&app_id, application::IntegrationKind::Http) |
| 418 | .await |
| 419 | .map_err(|e| e.status())?; |
| 420 | |
| 421 | let mut resp = Response::new(()); |
| 422 | resp.metadata_mut() |
| 423 | .insert("x-log-application_id", req.application_id.parse().unwrap()); |
| 424 | |
| 425 | Ok(resp) |
| 426 | } |
| 427 | |
| 428 | async fn create_influx_db_integration( |
| 429 | &self, |