diff options
Diffstat (limited to 'src/micropub')
-rw-r--r-- | src/micropub/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/micropub/mod.rs b/src/micropub/mod.rs index f5cb5b9..621d4f9 100644 --- a/src/micropub/mod.rs +++ b/src/micropub/mod.rs @@ -370,7 +370,7 @@ impl MicropubUpdate { } } if let Some(replace) = &self.replace { - if replace.iter().map(|(k, v)| k.as_str()).any(|k| { + if replace.iter().map(|(k, _)| k.as_str()).any(|k| { k.to_lowercase().as_str() == "uid" }) { return Err(MicropubError::from_static( @@ -671,11 +671,7 @@ pub(crate) async fn query<D: Storage, A: AuthBackend>( Some(url) => { match db.get_post(&url).await { Ok(some) => match some { - Some(post) => { - let mut response = axum::response::Json(&post).into_response(); - - response - }, + Some(post) => axum::response::Json(&post).into_response(), None => MicropubError::from_static( ErrorKind::NotFound, "The specified MF2 object was not found in database.", |