Compare commits

...

2 commits

Author SHA1 Message Date
d2f6c3cd66
chore(deps): lock file maintenance
All checks were successful
/ build (push) Successful in 1s
/ check (clippy) (push) Successful in 3s
/ check (module-ipv4-only-test) (push) Successful in 7s
/ check (module-ipv4-test) (push) Successful in 7s
/ check (module-ipv6-only-test) (push) Successful in 7s
/ check (module-ipv6-test) (push) Successful in 7s
/ check (module-nginx-test) (push) Successful in 6s
/ check (nextest) (push) Successful in 2s
/ check (treefmt) (push) Successful in 2s
/ report-size (push) Successful in 2s
2025-01-31 22:00:20 +01:00
13c9c544a7
fix(webnsupdate): updating IPv6 in ipv4-only mode
All checks were successful
/ build (push) Successful in 1s
/ check (clippy) (push) Successful in 2s
/ check (module-ipv4-only-test) (push) Successful in 7s
/ check (module-ipv4-test) (push) Successful in 7s
/ check (module-ipv6-only-test) (push) Successful in 7s
/ check (module-ipv6-test) (push) Successful in 7s
/ check (module-nginx-test) (push) Successful in 6s
/ check (nextest) (push) Successful in 2s
/ check (treefmt) (push) Successful in 2s
/ report-size (push) Successful in 1s
Dumb logic error T-T.
2025-01-31 21:46:27 +01:00
3 changed files with 13 additions and 13 deletions

4
Cargo.lock generated
View file

@ -185,9 +185,9 @@ checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
[[package]]
name = "cc"
version = "1.2.10"
version = "1.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf"
dependencies = [
"shlex",
]

6
flake.lock generated
View file

@ -37,11 +37,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1738021509,
"narHash": "sha256-JNUiceGsr7cVBUQxLBF1ILCe99E0qLxsVuet6GsZUuw=",
"lastModified": 1738142207,
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9db269672dbdbb519e0bd3ea24f01506c135e46f",
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
"type": "github"
},
"original": {

View file

@ -517,20 +517,20 @@ async fn update_records(
if let Some(ip) = ipv4 {
let ip = IpAddr::V4(ip);
if !state.ip_type.valid_for_type(ip) {
if state.ip_type.valid_for_type(ip) {
_ = trigger_update(ip, &state).await?;
} else {
tracing::warn!("requested update of IPv4 but we are {}", state.ip_type);
}
_ = trigger_update(ip, &state).await?;
}
if let Some(ip) = ipv6 {
let ip = IpAddr::V6(ip);
if !state.ip_type.valid_for_type(ip) {
if state.ip_type.valid_for_type(ip) {
_ = trigger_update(ip, &state).await?;
} else {
tracing::warn!("requested update of IPv6 but we are {}", state.ip_type);
}
_ = trigger_update(ip, &state).await?;
}
Ok("Successfully updated IP of records!\n")
@ -566,13 +566,13 @@ async fn trigger_update(
error!("nsupdate failed with code {status}");
Err((
StatusCode::INTERNAL_SERVER_ERROR,
"nsupdate failed, check server logs",
"nsupdate failed, check server logs\n",
)
.into())
}
Err(error) => Err((
StatusCode::INTERNAL_SERVER_ERROR,
format!("failed to update records: {error}"),
format!("failed to update records: {error}\n"),
)
.into()),
}