Compare commits
4 Commits
2d558eb17d
...
39344cdda0
Author | SHA1 | Date | |
---|---|---|---|
39344cdda0 | |||
a435d4623f | |||
4e4fa37b3b | |||
0540f515ec |
32
geneit_app/package-lock.json
generated
32
geneit_app/package-lock.json
generated
@@ -34,7 +34,7 @@
|
||||
"react-dom": "^19.1.1",
|
||||
"react-easy-crop": "^5.5.0",
|
||||
"react-qr-code": "^2.0.18",
|
||||
"react-router-dom": "^7.4.0",
|
||||
"react-router-dom": "^7.8.2",
|
||||
"react-zoom-pan-pinch": "^3.7.0",
|
||||
"svg2pdf.js": "^2.5.0"
|
||||
},
|
||||
@@ -2172,12 +2172,6 @@
|
||||
"@babel/types": "^7.20.7"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/cookie": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
|
||||
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||
@@ -4230,15 +4224,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router": {
|
||||
"version": "7.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.4.0.tgz",
|
||||
"integrity": "sha512-Y2g5ObjkvX3VFeVt+0CIPuYd9PpgqCslG7ASSIdN73LwA1nNWzcMLaoMRJfP3prZFI92svxFwbn7XkLJ+UPQ6A==",
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.8.2.tgz",
|
||||
"integrity": "sha512-7M2fR1JbIZ/jFWqelpvSZx+7vd7UlBTfdZqf6OSdF9g6+sfdqJDAWcak6ervbHph200ePlu+7G8LdoiC3ReyAQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/cookie": "^0.6.0",
|
||||
"cookie": "^1.0.1",
|
||||
"set-cookie-parser": "^2.6.0",
|
||||
"turbo-stream": "2.4.0"
|
||||
"set-cookie-parser": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
@@ -4254,12 +4246,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/react-router-dom": {
|
||||
"version": "7.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.4.0.tgz",
|
||||
"integrity": "sha512-VlksBPf3n2bijPvnA7nkTsXxMAKOj+bWp4R9c3i+bnwlSOFAGOkJkKhzy/OsRkWaBMICqcAl1JDzh9ZSOze9CA==",
|
||||
"version": "7.8.2",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.8.2.tgz",
|
||||
"integrity": "sha512-Z4VM5mKDipal2jQ385H6UBhiiEDlnJPx6jyWsTYoZQdl5TrjxEV2a9yl3Fi60NBJxYzOTGTTHXPi0pdizvTwow==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"react-router": "7.4.0"
|
||||
"react-router": "7.8.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
@@ -4664,12 +4656,6 @@
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/turbo-stream": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz",
|
||||
"integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/type-check": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
|
||||
|
@@ -36,7 +36,7 @@
|
||||
"react-dom": "^19.1.1",
|
||||
"react-easy-crop": "^5.5.0",
|
||||
"react-qr-code": "^2.0.18",
|
||||
"react-router-dom": "^7.4.0",
|
||||
"react-router-dom": "^7.8.2",
|
||||
"react-zoom-pan-pinch": "^3.7.0",
|
||||
"svg2pdf.js": "^2.5.0"
|
||||
},
|
||||
|
@@ -137,8 +137,10 @@ function UsersTable(p: {
|
||||
<GridActionsCellItem
|
||||
icon={<SaveIcon />}
|
||||
label="Save"
|
||||
sx={{
|
||||
color: "primary.main",
|
||||
material={{
|
||||
sx: {
|
||||
color: 'primary.main',
|
||||
},
|
||||
}}
|
||||
onClick={handleSaveClick(id)}
|
||||
/>,
|
||||
|
@@ -34,18 +34,16 @@ impl AccommodationRequest {
|
||||
}
|
||||
accommodation.name = self.name;
|
||||
|
||||
if let Some(d) = &self.description {
|
||||
if !c.accommodation_description_len.validate(d) {
|
||||
if let Some(d) = &self.description
|
||||
&& !c.accommodation_description_len.validate(d) {
|
||||
return Err(AccommodationListControllerErr::InvalidDescriptionLength.into());
|
||||
}
|
||||
}
|
||||
accommodation.description.clone_from(&self.description);
|
||||
|
||||
if let Some(c) = &self.color {
|
||||
if !lazy_regex::regex!("[a-fA-F0-9]{6}").is_match(c) {
|
||||
if let Some(c) = &self.color
|
||||
&& !lazy_regex::regex!("[a-fA-F0-9]{6}").is_match(c) {
|
||||
return Err(AccommodationListControllerErr::MalformedColor.into());
|
||||
}
|
||||
}
|
||||
accommodation.color.clone_from(&self.color);
|
||||
|
||||
accommodation.need_validation = self.need_validation;
|
||||
|
@@ -48,23 +48,20 @@ impl CoupleRequest {
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(husband) = self.husband {
|
||||
if !members_service::exists(couple.family_id(), husband).await? {
|
||||
if let Some(husband) = self.husband
|
||||
&& !members_service::exists(couple.family_id(), husband).await? {
|
||||
return Err(CoupleControllerErr::HusbandNotExisting.into());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(d) = &self.wedding {
|
||||
if !d.check() {
|
||||
if let Some(d) = &self.wedding
|
||||
&& !d.check() {
|
||||
return Err(CoupleControllerErr::MalformedDateOfWedding.into());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(d) = &self.divorce {
|
||||
if !d.check() {
|
||||
if let Some(d) = &self.divorce
|
||||
&& !d.check() {
|
||||
return Err(CoupleControllerErr::MalformedDateOfDivorce.into());
|
||||
}
|
||||
}
|
||||
|
||||
couple.set_wife(self.wife);
|
||||
couple.set_husband(self.husband);
|
||||
|
@@ -95,11 +95,10 @@ fn check_opt_str_val(
|
||||
c: SizeConstraint,
|
||||
err: MemberControllerErr,
|
||||
) -> anyhow::Result<()> {
|
||||
if let Some(v) = val {
|
||||
if !c.validate(v) {
|
||||
if let Some(v) = val
|
||||
&& !c.validate(v) {
|
||||
return Err(err.into());
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -151,11 +150,10 @@ impl MemberRequest {
|
||||
MemberControllerErr::MalformedEmailAddress,
|
||||
)?;
|
||||
|
||||
if let Some(mail) = &self.email {
|
||||
if !mailchecker::is_valid(mail) {
|
||||
if let Some(mail) = &self.email
|
||||
&& !mailchecker::is_valid(mail) {
|
||||
return Err(MemberControllerErr::InvalidEmailAddress.into());
|
||||
}
|
||||
}
|
||||
|
||||
check_opt_str_val(
|
||||
&self.phone,
|
||||
@@ -187,23 +185,20 @@ impl MemberRequest {
|
||||
MemberControllerErr::MalformedCountry,
|
||||
)?;
|
||||
|
||||
if let Some(c) = &self.country {
|
||||
if !countries_utils::is_code_valid(c) {
|
||||
if let Some(c) = &self.country
|
||||
&& !countries_utils::is_code_valid(c) {
|
||||
return Err(MemberControllerErr::InvalidCountryCode.into());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(d) = &self.birth {
|
||||
if !d.check() {
|
||||
if let Some(d) = &self.birth
|
||||
&& !d.check() {
|
||||
return Err(MemberControllerErr::MalformedDateOfBirth.into());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(d) = &self.death {
|
||||
if !d.check() {
|
||||
if let Some(d) = &self.death
|
||||
&& !d.check() {
|
||||
return Err(MemberControllerErr::MalformedDateOfDeath.into());
|
||||
}
|
||||
}
|
||||
|
||||
check_opt_str_val(
|
||||
&self.note,
|
||||
@@ -221,11 +216,10 @@ impl MemberRequest {
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(father) = self.father {
|
||||
if !members_service::exists(member.family_id(), father).await? {
|
||||
if let Some(father) = self.father
|
||||
&& !members_service::exists(member.family_id(), father).await? {
|
||||
return Err(MemberControllerErr::FatherNotExisting.into());
|
||||
}
|
||||
}
|
||||
|
||||
member.first_name = self.first_name;
|
||||
member.last_name = self.last_name;
|
||||
|
@@ -36,16 +36,15 @@ async fn get_photo(id: &PhotoIdPath, full_size: bool, req: HttpRequest) -> HttpR
|
||||
};
|
||||
|
||||
// Check if an upload is un-necessary
|
||||
if let Some(c) = req.headers().get(header::IF_NONE_MATCH) {
|
||||
if c.to_str().unwrap_or("") == hash {
|
||||
if let Some(c) = req.headers().get(header::IF_NONE_MATCH)
|
||||
&& c.to_str().unwrap_or("") == hash {
|
||||
return Ok(HttpResponse::NotModified().finish());
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(c) = req.headers().get(header::IF_MODIFIED_SINCE) {
|
||||
let date_str = c.to_str().unwrap_or("");
|
||||
if let Ok(date) = httpdate::parse_http_date(date_str) {
|
||||
if date
|
||||
if let Ok(date) = httpdate::parse_http_date(date_str)
|
||||
&& date
|
||||
.add(Duration::from_secs(1))
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.unwrap()
|
||||
@@ -54,7 +53,6 @@ async fn get_photo(id: &PhotoIdPath, full_size: bool, req: HttpRequest) -> HttpR
|
||||
{
|
||||
return Ok(HttpResponse::NotModified().finish());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let bytes = s3_connection::get_file(&match full_size {
|
||||
|
@@ -149,11 +149,10 @@ pub mod loop_detection {
|
||||
|
||||
impl LoopStack<'_> {
|
||||
pub fn contains(&self, id: MemberID) -> bool {
|
||||
if let Some(ls) = &self.prev {
|
||||
if ls.contains(id) {
|
||||
if let Some(ls) = &self.prev
|
||||
&& ls.contains(id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
self.curr == id
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ fn redis_key(state: &str) -> String {
|
||||
format!("oidc-state-{state}")
|
||||
}
|
||||
|
||||
async fn load_provider_info(prov_id: &str) -> anyhow::Result<OpenIDClient> {
|
||||
async fn load_provider_info(prov_id: &str) -> anyhow::Result<OpenIDClient<'_>> {
|
||||
let prov = AppConfig::get()
|
||||
.openid_providers()
|
||||
.into_iter()
|
||||
|
Reference in New Issue
Block a user