features, cleanup and bug fixes #26
1 changed files with 6 additions and 6 deletions
fix unnecessary qualification warning
commit
82abb63c83
|
|
@ -50,7 +50,7 @@ pub(crate) async fn index(
|
|||
hb: web::Data<Handlebars<'_>>,
|
||||
offers: web::Data<JobOffers>,
|
||||
) -> Result<HttpResponse, PresentationError> {
|
||||
let user = auth::User::current(&session).ok();
|
||||
let user = User::current(&session).ok();
|
||||
|
||||
let job_offers = {
|
||||
let guard = offers.get_offers().await;
|
||||
|
|
@ -67,7 +67,7 @@ pub(crate) async fn index(
|
|||
|
||||
let rendered = hb.render(template::JOBOFFEL_OVERVIEW, &data)?;
|
||||
Ok(HttpResponse::Ok()
|
||||
.insert_header((http::header::CONTENT_TYPE, HTML_CONTENT.clone()))
|
||||
.insert_header((CONTENT_TYPE, HTML_CONTENT.clone()))
|
||||
.body(rendered))
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ pub(crate) async fn preview_attachment(
|
|||
session: Session,
|
||||
hb: web::Data<Handlebars<'_>>,
|
||||
) -> Result<HttpResponse, PresentationError> {
|
||||
let user = auth::User::current(&session).ok();
|
||||
let user = User::current(&session).ok();
|
||||
|
||||
let data = json!({
|
||||
"base": super::base(&req,&config, "Joboffers")?,
|
||||
|
|
@ -142,7 +142,7 @@ pub(crate) async fn preview_attachment(
|
|||
let body = hb.render(template::JOBOFFER_ATTACHMENT_PREVIEW, &data)?;
|
||||
|
||||
Ok(HttpResponse::Ok()
|
||||
.insert_header((http::header::CONTENT_TYPE, HTML_CONTENT.clone()))
|
||||
.insert_header((CONTENT_TYPE, HTML_CONTENT.clone()))
|
||||
.body(body))
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ pub(crate) async fn summary(
|
|||
session: Session,
|
||||
offers: web::Data<JobOffers>,
|
||||
) -> Result<HttpResponse, actix_web::Error> {
|
||||
let user = auth::User::current(&session).ok();
|
||||
let user = User::current(&session).ok();
|
||||
let previews = {
|
||||
let guard = offers.get_offers().await;
|
||||
crate::job_offers::job_data(&req, guard, user.as_ref())
|
||||
|
|
@ -176,7 +176,7 @@ pub(crate) async fn sync(
|
|||
) -> Result<HttpResponse, SyncError> {
|
||||
// TODO return the user to a page where they are asked to confirm syncing
|
||||
// aka. the get variant of this route
|
||||
auth::User::current(&session)?;
|
||||
User::current(&session)?;
|
||||
offers.sync(&config).await?;
|
||||
let dest = req
|
||||
.url_for_static(JOBOFFER_OVERVIEW_ROUTE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue