PUT object: Return ETag

This commit is contained in:
Lennart
2025-12-31 16:17:34 +01:00
parent 4fabf74333
commit 271fdfd686
3 changed files with 21 additions and 8 deletions

View File

@@ -52,11 +52,11 @@ pub async fn route_delete<R: ResourceService>(
return Err(Error::Unauthorized.into());
}
if let Some(if_match) = if_match {
if !resource.satisfies_if_match(&if_match) {
// Precondition failed
return Err(crate::Error::PreconditionFailed.into());
}
if let Some(if_match) = if_match
&& !resource.satisfies_if_match(&if_match)
{
// Precondition failed
return Err(crate::Error::PreconditionFailed.into());
}
if let Some(if_none_match) = if_none_match
&& resource.satisfies_if_none_match(&if_none_match)