(id: Uuid)
| 620 | } |
| 621 | |
| 622 | pub async fn get_vendor(id: Uuid) -> Result<Vendor, Error> { |
| 623 | let v = device_profile_vendor::table |
| 624 | .find(&fields::Uuid::from(id)) |
| 625 | .first(&mut get_async_db_conn().await?) |
| 626 | .await |
| 627 | .map_err(|e| Error::from_diesel(e, id.to_string()))?; |
| 628 | Ok(v) |
| 629 | } |
| 630 | |
| 631 | pub async fn delete_vendor(id: uuid::Uuid) -> Result<(), Error> { |
| 632 | let ra = diesel::delete(device_profile_vendor::table.find(&fields::Uuid::from(id))) |