(id: &Uuid)
| 76 | } |
| 77 | |
| 78 | pub async fn get_item(id: &Uuid) -> Result<DeviceQueueItem, Error> { |
| 79 | let qi = device_queue_item::dsl::device_queue_item |
| 80 | .find(&fields::Uuid::from(id)) |
| 81 | .first(&mut get_async_db_conn().await?) |
| 82 | .await |
| 83 | .map_err(|e| Error::from_diesel(e, id.to_string()))?; |
| 84 | Ok(qi) |
| 85 | } |
| 86 | |
| 87 | pub async fn update_item(qi: DeviceQueueItem) -> Result<DeviceQueueItem, Error> { |
| 88 | let qi: DeviceQueueItem = |