MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / delete_device

Method delete_device

chirpstack/src/api/device_profile.rs:866–890  ·  view source on GitHub ↗
(
        &self,
        request: Request<api::DeleteDeviceProfileDeviceRequest>,
    )

Source from the content-addressed store, hash-verified

864 }
865
866 async fn delete_device(
867 &self,
868 request: Request<api::DeleteDeviceProfileDeviceRequest>,
869 ) -> Result<Response<()>, Status> {
870 let req = request.get_ref();
871 let device_id = Uuid::from_str(&req.id).map_err(|e| e.status())?;
872
873 self.validator
874 .validate(
875 request.extensions(),
876 validator::ValidateDeviceProfileDeviceAccess::new(validator::Flag::Delete),
877 )
878 .await?;
879
880 let _ = device_profile::delete_device(device_id)
881 .await
882 .map_err(|e| e.status())?;
883
884 let mut resp = Response::new(());
885
886 resp.metadata_mut()
887 .insert("x-log-device_id", req.id.parse().unwrap());
888
889 Ok(resp)
890 }
891
892 async fn list_adr_algorithms(
893 &self,

Callers 1

test_device_profileFunction · 0.80

Calls 5

delete_deviceFunction · 0.85
statusMethod · 0.80
insertMethod · 0.80
unwrapMethod · 0.80
validateMethod · 0.45

Tested by 1

test_device_profileFunction · 0.64