Update actix-web to 3.0, update deps (#82)

This commit is contained in:
Aeledfyr
2020-10-18 12:50:37 -05:00
committed by GitHub
parent d0fb5c3bd5
commit 25daa9f2da
7 changed files with 425 additions and 280 deletions

View File

@@ -78,7 +78,7 @@ pub async fn mod_get(
info: web::Path<(models::ids::ModId,)>,
pool: web::Data<PgPool>,
) -> Result<HttpResponse, ApiError> {
let id = info.0;
let id = info.into_inner().0;
let mod_data = database::models::Mod::get_full(id.into(), &**pool)
.await
.map_err(|e| ApiError::DatabaseError(e.into()))?;
@@ -138,7 +138,7 @@ pub async fn mod_delete(
.await
.map_err(|_| ApiError::AuthenticationError)?;
let id = info.0;
let id = info.into_inner().0;
let result = database::models::Mod::remove_full(id.into(), &**pool)
.await
.map_err(|e| ApiError::DatabaseError(e.into()))?;