(id: &Uuid)
| 312 | } |
| 313 | |
| 314 | pub async fn get(id: &Uuid) -> Result<Application, Error> { |
| 315 | let a = application::dsl::application |
| 316 | .find(fields::Uuid::from(id)) |
| 317 | .first(&mut get_async_db_conn().await?) |
| 318 | .await |
| 319 | .map_err(|e| Error::from_diesel(e, id.to_string()))?; |
| 320 | Ok(a) |
| 321 | } |
| 322 | |
| 323 | pub async fn update(a: Application) -> Result<Application, Error> { |
| 324 | a.validate()?; |