features, cleanup and bug fixes #26

Merged
ben merged 30 commits from ben/Jobboerse:main into main 2022-06-09 17:36:55 +02:00
Showing only changes of commit 30626fe8ee - Show all commits

fix compilation error

Bennet Bleßmann 2022-06-09 17:25:24 +02:00 committed by Bennet Bleßmann
Signed by: ben
GPG key ID: 3BE1A1A3CBC3CF99

View file

@ -6,7 +6,7 @@ use actix_web::{
use error::AttachmentResponseError; use error::AttachmentResponseError;
use handlebars::Handlebars; use handlebars::Handlebars;
use http::header::CONTENT_TYPE; use http::header::CONTENT_TYPE;
use serde::Deserialize; use serde::{Deserialize, Serialize};
use serde_json::json; use serde_json::json;
pub(crate) mod confirmation; pub(crate) mod confirmation;
@ -167,6 +167,7 @@ pub(crate) async fn summary(
crate::job_offers::job_data(&req, guard.iter(), user.as_ref()) crate::job_offers::job_data(&req, guard.iter(), user.as_ref())
}; };
#[derive(Serialize)]
struct SummaryData { struct SummaryData {
version: &'static str, version: &'static str,
entries: Vec<JobOfferViewData>, entries: Vec<JobOfferViewData>,
@ -176,7 +177,7 @@ pub(crate) async fn summary(
let data = json!(SummaryData { let data = json!(SummaryData {
version: "1", version: "1",
entries: previews, entries: previews,
overview: SerializableUrl(req.url_for_static(JOBOFFER_OVERVIEW_ROUTE)) overview: SerializableUrl(req.url_for_static(JOBOFFER_OVERVIEW_ROUTE)?)
}); });
Ok(HttpResponse::Ok() Ok(HttpResponse::Ok()