(id: &Uuid)
| 182 | } |
| 183 | |
| 184 | pub async fn delete(id: &Uuid) -> Result<(), Error> { |
| 185 | let ra = diesel::delete(multicast_group::dsl::multicast_group.find(&fields::Uuid::from(id))) |
| 186 | .execute(&mut get_async_db_conn().await?) |
| 187 | .await?; |
| 188 | if ra == 0 { |
| 189 | return Err(Error::NotFound(id.to_string())); |
| 190 | } |
| 191 | info!(id = %id, "Multicast-group deleted"); |
| 192 | Ok(()) |
| 193 | } |
| 194 | |
| 195 | pub async fn get_count(filters: &Filters) -> Result<i64, Error> { |
| 196 | let mut q = multicast_group::table |