changes for version 0.1.5 and release of version 0.1.5 #23

Merged
ben merged 5 commits from ben/Jobboerse:main into main 2022-05-26 18:46:18 +02:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit ef90789da5 - Show all commits

fix /summary should be accessible to anonymous visitors

Bennet Bleßmann 2022-05-26 16:54:15 +02:00 committed by Bennet Bleßmann
Signed by: ben
GPG key ID: 3BE1A1A3CBC3CF99

View file

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fix
- /summary should be accessible for anonymous visitors
## [0.1.4] (2022-05-25)
### Fix

View file

@ -148,10 +148,10 @@ pub(crate) async fn summary(
session: Session,
offers: web::Data<JobOffers>,
) -> Result<HttpResponse, actix_web::Error> {
let user = auth::User::current(&session)?;
let user = auth::User::current(&session).ok();
let previews = {
let guard = offers.get_offers().await;
crate::job_offers::job_data(&req, guard, Some(&user))
crate::job_offers::job_data(&req, guard, user.as_ref())
};
let data = json!(previews);
Ok(HttpResponse::Ok()