let res = web::block(move || oper.perform(db.get_ref().to_owned(), Some(ws_info)))
.await
.map(|json| HttpResponse::Ok().json(json))
- .map_err(|e| ErrorBadRequest(e))?;
+ .map_err(ErrorBadRequest)?;
Ok(res)
}
.content_type("application/rss+xml")
.body(rss)
})
- .map_err(|e| ErrorBadRequest(e))?;
+ .map_err(ErrorBadRequest)?;
Ok(res)
}
.content_type("application/rss+xml")
.body(rss)
})
- .map_err(|e| ErrorBadRequest(e))?;
+ .map_err(ErrorBadRequest)?;
Ok(res)
}
})
.await
.map(|json| HttpResponse::Ok().json(json))
- .map_err(|e| ErrorBadRequest(e))?;
+ .map_err(ErrorBadRequest)?;
Ok(res)
}
})
.await
.map(|json| HttpResponse::Ok().json(json))
- .map_err(|e| ErrorBadRequest(e))?;
+ .map_err(ErrorBadRequest)?;
Ok(res)
}