(id: &Uuid)
| 149 | } |
| 150 | |
| 151 | pub async fn get(id: &Uuid) -> Result<MulticastGroup, Error> { |
| 152 | multicast_group::dsl::multicast_group |
| 153 | .find(&fields::Uuid::from(id)) |
| 154 | .first(&mut get_async_db_conn().await?) |
| 155 | .await |
| 156 | .map_err(|e| Error::from_diesel(e, id.to_string())) |
| 157 | } |
| 158 | |
| 159 | pub async fn update(mg: MulticastGroup) -> Result<MulticastGroup, Error> { |
| 160 | mg.validate()?; |