(id: Uuid)
| 611 | } |
| 612 | |
| 613 | pub async fn get_device(id: Uuid) -> Result<Device, Error> { |
| 614 | let d = device_profile_device::table |
| 615 | .find(&fields::Uuid::from(id)) |
| 616 | .first(&mut get_async_db_conn().await?) |
| 617 | .await |
| 618 | .map_err(|e| Error::from_diesel(e, id.to_string()))?; |
| 619 | Ok(d) |
| 620 | } |
| 621 | |
| 622 | pub async fn get_vendor(id: Uuid) -> Result<Vendor, Error> { |
| 623 | let v = device_profile_vendor::table |