| 1769 | } |
| 1770 | |
| 1771 | async fn delete_blynk_integration( |
| 1772 | &self, |
| 1773 | request: Request<api::DeleteBlynkIntegrationRequest>, |
| 1774 | ) -> Result<Response<()>, Status> { |
| 1775 | let req = request.get_ref(); |
| 1776 | let app_id = Uuid::from_str(&req.application_id).map_err(|e| e.status())?; |
| 1777 | |
| 1778 | self.validator |
| 1779 | .validate( |
| 1780 | request.extensions(), |
| 1781 | validator::ValidateApplicationAccess::new(validator::Flag::Update, app_id), |
| 1782 | ) |
| 1783 | .await?; |
| 1784 | |
| 1785 | application::delete_integration(&app_id, application::IntegrationKind::Blynk) |
| 1786 | .await |
| 1787 | .map_err(|e| e.status())?; |
| 1788 | |
| 1789 | let mut resp = Response::new(()); |
| 1790 | resp.metadata_mut() |
| 1791 | .insert("x-log-application_id", req.application_id.parse().unwrap()); |
| 1792 | |
| 1793 | Ok(resp) |
| 1794 | } |
| 1795 | |
| 1796 | async fn generate_mqtt_integration_client_certificate( |
| 1797 | &self, |