Compare commits
1 Commits
master
...
32343c29b3
Author | SHA1 | Date | |
---|---|---|---|
32343c29b3 |
72
geneit_app/package-lock.json
generated
72
geneit_app/package-lock.json
generated
@ -9,19 +9,19 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource/roboto": "^5.2.6",
|
||||
"@fullcalendar/core": "^6.1.18",
|
||||
"@fullcalendar/daygrid": "^6.1.18",
|
||||
"@fullcalendar/interaction": "^6.1.18",
|
||||
"@fullcalendar/list": "^6.1.18",
|
||||
"@fullcalendar/react": "^6.1.18",
|
||||
"@fullcalendar/core": "^6.1.17",
|
||||
"@fullcalendar/daygrid": "^6.1.17",
|
||||
"@fullcalendar/interaction": "^6.1.17",
|
||||
"@fullcalendar/list": "^6.1.17",
|
||||
"@fullcalendar/react": "^6.1.17",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/react": "^1.6.1",
|
||||
"@mui/icons-material": "^7.1.2",
|
||||
"@mui/lab": "^7.0.0-beta.14",
|
||||
"@mui/material": "^7.1.2",
|
||||
"@mui/x-data-grid": "^7.29.8",
|
||||
"@mui/x-data-grid": "^7.29.6",
|
||||
"@mui/x-date-pickers": "^7.29.4",
|
||||
"@mui/x-tree-view": "^7.29.1",
|
||||
"date-and-time": "^3.6.0",
|
||||
@ -33,7 +33,7 @@
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-easy-crop": "^5.4.2",
|
||||
"react-qr-code": "^2.0.18",
|
||||
"react-qr-code": "^2.0.16",
|
||||
"react-router-dom": "^7.4.0",
|
||||
"react-zoom-pan-pinch": "^3.7.0",
|
||||
"svg2pdf.js": "^2.5.0"
|
||||
@ -459,9 +459,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@emotion/styled": {
|
||||
"version": "11.14.1",
|
||||
"resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz",
|
||||
"integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==",
|
||||
"version": "11.14.0",
|
||||
"resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.0.tgz",
|
||||
"integrity": "sha512-XxfOnXFffatap2IyCeJyNov3kiDQWoR08gPUQxvbL7fxKryGBKUZUkG6Hz48DZwVrJSVh9sJboyV1Ds4OW6SgA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.3",
|
||||
@ -1097,48 +1097,48 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/core": {
|
||||
"version": "6.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.18.tgz",
|
||||
"integrity": "sha512-cD7XtZIZZ87Cg2+itnpsONCsZ89VIfLLDZ22pQX4IQVWlpYUB3bcCf878DhWkqyEen6dhi5ePtBoqYgm5K+0fQ==",
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.17.tgz",
|
||||
"integrity": "sha512-0W7lnIrv18ruJ5zeWBeNZXO8qCWlzxDdp9COFEsZnyNjiEhUVnrW/dPbjRKYpL0edGG0/Lhs0ghp1z/5ekt8ZA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"preact": "~10.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/daygrid": {
|
||||
"version": "6.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.18.tgz",
|
||||
"integrity": "sha512-s452Zle1SdMEzZDw+pDczm8m3JLIZzS9ANMThXTnqeqJewW1gqNFYas18aHypJSgF9Fh9rDJjTSUw04BpXB/Mg==",
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.17.tgz",
|
||||
"integrity": "sha512-K7m+pd7oVJ9fW4h7CLDdDGJbc9szJ1xDU1DZ2ag+7oOo1aCNLv44CehzkkknM6r8EYlOOhgaelxQpKAI4glj7A==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@fullcalendar/core": "~6.1.18"
|
||||
"@fullcalendar/core": "~6.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/interaction": {
|
||||
"version": "6.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/interaction/-/interaction-6.1.18.tgz",
|
||||
"integrity": "sha512-f/mD5RTjzw+Q6MGTMZrLCgIrQLIUUO9NV/58aM2J6ZBQZeRlNizDqmqldqyG+j49zj2vFhUfZibPrVKWm5yA4Q==",
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/interaction/-/interaction-6.1.17.tgz",
|
||||
"integrity": "sha512-AudvQvgmJP2FU89wpSulUUjeWv24SuyCx8FzH2WIPVaYg+vDGGYarI7K6PcM3TH7B/CyaBjm5Rqw9lXgnwt5YA==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@fullcalendar/core": "~6.1.18"
|
||||
"@fullcalendar/core": "~6.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/list": {
|
||||
"version": "6.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/list/-/list-6.1.18.tgz",
|
||||
"integrity": "sha512-XPZI50mq3HXyDQ5sT3jmqQUuwG8zQb5H14dQIUAmOHAIFRA3WpkxlzrXO0U1SrosvGySMPyyNNxvMKI1Q/jL7A==",
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/list/-/list-6.1.17.tgz",
|
||||
"integrity": "sha512-fkyK49F9IxwlGUBVhJGsFpd/LTi/vRVERLIAe1HmBaGkjwpxnynm8TMLb9mZip97wvDk3CmZWduMe6PxscAlow==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@fullcalendar/core": "~6.1.18"
|
||||
"@fullcalendar/core": "~6.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/react": {
|
||||
"version": "6.1.18",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/react/-/react-6.1.18.tgz",
|
||||
"integrity": "sha512-Jwvb+T+/1yGZKe+UYXn0id022HJm0Fq2X/PGFvVh/QRYAI/6xPMRvJrwercBkToxf6LjqYXrDO+/NhRN6IDlmg==",
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/react/-/react-6.1.17.tgz",
|
||||
"integrity": "sha512-AA8soHhlfRH5dUeqHnfAtzDiXa2vrgWocJSK/F5qzw/pOxc9MqpuoS/nQBROWtHHg6yQUg3DoGqOOhi7dmylXQ==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@fullcalendar/core": "~6.1.18",
|
||||
"@fullcalendar/core": "~6.1.17",
|
||||
"react": "^16.7.0 || ^17 || ^18 || ^19",
|
||||
"react-dom": "^16.7.0 || ^17 || ^18 || ^19"
|
||||
}
|
||||
@ -1550,9 +1550,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/x-data-grid": {
|
||||
"version": "7.29.8",
|
||||
"resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-7.29.8.tgz",
|
||||
"integrity": "sha512-m4Dp1Vig8gFiBlcEOWimUku182cEw5YrAyXS3PfTSdbxa/20bFw7a8mlHdxO9ChHQRMf6TqbisdRm23CDIIdog==",
|
||||
"version": "7.29.6",
|
||||
"resolved": "https://registry.npmjs.org/@mui/x-data-grid/-/x-data-grid-7.29.6.tgz",
|
||||
"integrity": "sha512-2x3+jaqqiia3FjTcsN2PjlnVKHiVFqrDvcJ6p/PFAjI75uSG6rhOhx4bwrJxm3+TWFnZD5Ir8Ln9MYLiPjIEUQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.25.7",
|
||||
@ -4060,9 +4060,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-qr-code": {
|
||||
"version": "2.0.18",
|
||||
"resolved": "https://registry.npmjs.org/react-qr-code/-/react-qr-code-2.0.18.tgz",
|
||||
"integrity": "sha512-v1Jqz7urLMhkO6jkgJuBYhnqvXagzceg3qJUWayuCK/c6LTIonpWbwxR1f1APGd4xrW/QcQEovNrAojbUz65Tg==",
|
||||
"version": "2.0.16",
|
||||
"resolved": "https://registry.npmjs.org/react-qr-code/-/react-qr-code-2.0.16.tgz",
|
||||
"integrity": "sha512-8f54aTOo7DxYr1LB47pMeclV5SL/zSbJxkXHIS2a+QnAIa4XDVIdmzYRC+CBCJeDLSCeFHn8gHtltwvwZGJD/w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"prop-types": "^15.8.1",
|
||||
|
@ -11,19 +11,19 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/styled": "^11.14.1",
|
||||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource/roboto": "^5.2.6",
|
||||
"@fullcalendar/core": "^6.1.18",
|
||||
"@fullcalendar/daygrid": "^6.1.18",
|
||||
"@fullcalendar/interaction": "^6.1.18",
|
||||
"@fullcalendar/list": "^6.1.18",
|
||||
"@fullcalendar/react": "^6.1.18",
|
||||
"@fullcalendar/core": "^6.1.17",
|
||||
"@fullcalendar/daygrid": "^6.1.17",
|
||||
"@fullcalendar/interaction": "^6.1.17",
|
||||
"@fullcalendar/list": "^6.1.17",
|
||||
"@fullcalendar/react": "^6.1.17",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@mdi/react": "^1.6.1",
|
||||
"@mui/icons-material": "^7.1.2",
|
||||
"@mui/lab": "^7.0.0-beta.14",
|
||||
"@mui/material": "^7.1.2",
|
||||
"@mui/x-data-grid": "^7.29.8",
|
||||
"@mui/x-data-grid": "^7.29.6",
|
||||
"@mui/x-date-pickers": "^7.29.4",
|
||||
"@mui/x-tree-view": "^7.29.1",
|
||||
"date-and-time": "^3.6.0",
|
||||
@ -35,7 +35,7 @@
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"react-easy-crop": "^5.4.2",
|
||||
"react-qr-code": "^2.0.18",
|
||||
"react-qr-code": "^2.0.16",
|
||||
"react-router-dom": "^7.4.0",
|
||||
"react-zoom-pan-pinch": "^3.7.0",
|
||||
"svg2pdf.js": "^2.5.0"
|
||||
|
@ -21,7 +21,7 @@ where
|
||||
if POSTGRES_CONNECTION.with(|i| i.borrow().is_none()) {
|
||||
let database_url = AppConfig::get().db_connection_chain();
|
||||
let conn = PgConnection::establish(&database_url)
|
||||
.unwrap_or_else(|_| panic!("Error connecting to {database_url}"));
|
||||
.unwrap_or_else(|_| panic!("Error connecting to {}", database_url));
|
||||
|
||||
POSTGRES_CONNECTION.with(|i| *i.borrow_mut() = Some(conn))
|
||||
}
|
||||
@ -38,7 +38,7 @@ where
|
||||
POSTGRES_CONNECTION.with(|i| *i.borrow_mut() = None)
|
||||
}
|
||||
|
||||
log::error!("Database query error! {e:?}");
|
||||
log::error!("Database query error! {:?}", e);
|
||||
Err(e.into())
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ pub async fn create_bucket_if_required() -> anyhow::Result<()> {
|
||||
log::warn!("The bucket does not seem to exists, trying to create it!")
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("Got unexpected error when querying bucket info: {e}");
|
||||
log::error!("Got unexpected error when querying bucket info: {}", e);
|
||||
return Err(BucketServiceError::FailedFetchBucketInfo.into());
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,10 @@ pub async fn request_reset_password(
|
||||
match users_service::get_by_mail(&req.mail).await {
|
||||
Ok(mut user) => users_service::request_reset_password(&mut user).await?,
|
||||
Err(e) => {
|
||||
log::error!("Could not locate user account {e}! (error silently ignored)");
|
||||
log::error!(
|
||||
"Could not locate user account {}! (error silently ignored)",
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +122,7 @@ pub async fn check_reset_password_token(
|
||||
RatedAction::CheckResetPasswordTokenFailed,
|
||||
)
|
||||
.await?;
|
||||
log::error!("Password reset token could not be used: {e}");
|
||||
log::error!("Password reset token could not be used: {}", e);
|
||||
return Ok(HttpResponse::NotFound().finish());
|
||||
}
|
||||
};
|
||||
@ -153,7 +156,7 @@ pub async fn reset_password(remote_ip: RemoteIP, req: web::Json<ResetPasswordBod
|
||||
RatedAction::CheckResetPasswordTokenFailed,
|
||||
)
|
||||
.await?;
|
||||
log::error!("Password reset token could not be used: {e}");
|
||||
log::error!("Password reset token could not be used: {}", e);
|
||||
return Ok(HttpResponse::NotFound().finish());
|
||||
}
|
||||
};
|
||||
@ -193,7 +196,7 @@ pub async fn password_login(remote_ip: RemoteIP, req: web::Json<PasswordLoginQue
|
||||
let user = match users_service::get_by_mail(&req.mail).await {
|
||||
Ok(u) => u,
|
||||
Err(e) => {
|
||||
log::error!("Auth failed: could not find account by mail! {e}");
|
||||
log::error!("Auth failed: could not find account by mail! {}", e);
|
||||
rate_limiter_service::record_action(remote_ip.0, RatedAction::FailedPasswordLogin)
|
||||
.await?;
|
||||
return Ok(HttpResponse::Unauthorized().json("Invalid credentials"));
|
||||
|
@ -183,9 +183,9 @@ pub async fn import_family(
|
||||
}
|
||||
|
||||
if let Err(e) = req_member_data.to_member(member).await {
|
||||
log::error!("Error while processing import (member {req_id:?}) - {e}");
|
||||
log::error!("Error while processing import (member {:?}) - {e}", req_id);
|
||||
return Ok(
|
||||
HttpResponse::BadRequest().json(format!("Failed to validate member {req_id:?}!"))
|
||||
HttpResponse::BadRequest().json(format!("Failed to validate member {:?}!", req_id))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ impl Display for HttpErr {
|
||||
|
||||
impl actix_web::error::ResponseError for HttpErr {
|
||||
fn error_response(&self) -> HttpResponse<BoxBody> {
|
||||
log::error!("Error while processing request! {self}");
|
||||
log::error!("Error while processing request! {}", self);
|
||||
HttpResponse::InternalServerError().body("Failed to execute request!")
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ impl FromRequest for FamilyAndAccommodationInPath {
|
||||
Self::load_accommodation_from_path(family, accommodation_id)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
log::error!("Failed to extract accommodation ID from URL! {e}");
|
||||
log::error!("Failed to extract accommodation ID from URL! {}", e);
|
||||
actix_web::error::ErrorNotFound("Could not fetch accommodation information!")
|
||||
})
|
||||
})
|
||||
|
@ -85,7 +85,7 @@ impl FromRequest for FamilyAndAccommodationReservationCalendarInPath {
|
||||
Self::load_calendar_from_path(family, accommodation_id)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
log::error!("Failed to extract calendar ID from URL! {e}");
|
||||
log::error!("Failed to extract calendar ID from URL! {}", e);
|
||||
actix_web::error::ErrorNotFound("Could not fetch calendar information!")
|
||||
})
|
||||
})
|
||||
|
@ -95,7 +95,7 @@ impl FromRequest for FamilyAndAccommodationReservationInPath {
|
||||
Self::load_accommodation_reservation_from_path(family, reservation_id)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
log::error!("Failed to extract accommodation ID from URL! {e}");
|
||||
log::error!("Failed to extract accommodation ID from URL! {}", e);
|
||||
actix_web::error::ErrorNotFound("Could not fetch accommodation information!")
|
||||
})
|
||||
})
|
||||
|
@ -71,7 +71,7 @@ impl FromRequest for FamilyAndCoupleInPath {
|
||||
FamilyAndCoupleInPath::load_couple_from_path(family, couple_id)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
log::error!("Failed to extract couple ID from URL! {e}");
|
||||
log::error!("Failed to extract couple ID from URL! {}", e);
|
||||
actix_web::error::ErrorNotFound("Could not fetch couple information!")
|
||||
})
|
||||
})
|
||||
|
@ -62,7 +62,7 @@ impl FromRequest for FamilyInPath {
|
||||
FamilyInPath::load_family_from_path(&token, family_id)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
log::error!("Failed to extract family ID from URL! {e}");
|
||||
log::error!("Failed to extract family ID from URL! {}", e);
|
||||
actix_web::error::ErrorNotFound("Could not fetch family information!")
|
||||
})
|
||||
})
|
||||
|
@ -71,7 +71,7 @@ impl FromRequest for FamilyAndMemberInPath {
|
||||
FamilyAndMemberInPath::load_member_from_path(family, member_id)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
log::error!("Failed to extract member ID from URL! {e}");
|
||||
log::error!("Failed to extract member ID from URL! {}", e);
|
||||
actix_web::error::ErrorNotFound("Could not fetch member information!")
|
||||
})
|
||||
})
|
||||
|
@ -43,7 +43,7 @@ impl User {
|
||||
.as_deref()
|
||||
.map(|hash| {
|
||||
bcrypt::verify(password, hash).unwrap_or_else(|e| {
|
||||
log::error!("Failed to validate password! {e}");
|
||||
log::error!("Failed to validate password! {}", e);
|
||||
false
|
||||
})
|
||||
})
|
||||
|
@ -125,13 +125,13 @@ async fn load_token_info(token: &LoginTokenValue) -> anyhow::Result<Option<Login
|
||||
let token = match user_tokens.iter_mut().find(|t| t.key == key) {
|
||||
Some(t) => t,
|
||||
None => {
|
||||
log::error!("Could not find token for key '{key}' (missing token)");
|
||||
log::error!("Could not find token for key '{}' (missing token)", key);
|
||||
return Ok(None);
|
||||
}
|
||||
};
|
||||
|
||||
if token.is_expired() {
|
||||
log::error!("Could not find token for key '{key}' (token expired)");
|
||||
log::error!("Could not find token for key '{}' (token expired)", key);
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ impl FromRequest for LoginToken {
|
||||
|
||||
let token = match load_token_info(&token).await {
|
||||
Err(e) => {
|
||||
log::error!("Failed to load auth token! {e}");
|
||||
log::error!("Failed to load auth token! {}", e);
|
||||
return Err(actix_web::error::ErrorPreconditionFailed(
|
||||
"Failed to check auth token!",
|
||||
));
|
||||
|
@ -27,7 +27,7 @@ pub async fn send_mail<D: Display>(to: &str, subject: &str, body: D) -> anyhow::
|
||||
let mailer = mailer.build();
|
||||
|
||||
mailer.send(&email)?;
|
||||
log::debug!("A mail was sent to {to} (subject = {subject})");
|
||||
log::debug!("A mail was sent to {} (subject = {})", to, subject);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ pub mod loop_detection {
|
||||
None => false,
|
||||
Some(id) => {
|
||||
if curr_stack.contains(id) {
|
||||
log::debug!("Loop detected! {curr_stack:?}");
|
||||
log::debug!("Loop detected! {:?}", curr_stack);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ pub fn sha256(bytes: &[u8]) -> String {
|
||||
let mut hasher = Sha256::new();
|
||||
hasher.update(bytes);
|
||||
let h = hasher.finalize();
|
||||
format!("{h:x}")
|
||||
format!("{:x}", h)
|
||||
}
|
||||
|
||||
/// Compute hash of a slice of bytes (sha512)
|
||||
@ -13,5 +13,5 @@ pub fn sha512(bytes: &[u8]) -> String {
|
||||
let mut hasher = Sha512::new();
|
||||
hasher.update(bytes);
|
||||
let h = hasher.finalize();
|
||||
format!("{h:x}")
|
||||
format!("{:x}", h)
|
||||
}
|
||||
|
Reference in New Issue
Block a user