calendarobject: Rename get_id to get_uid

This commit is contained in:
Lennart
2025-11-01 21:23:55 +01:00
parent a53c333f1f
commit db144ebcae
7 changed files with 12 additions and 13 deletions

View File

@@ -61,7 +61,7 @@ fn objects_response(
) -> Result<MultistatusElement<CalendarObjectPropWrapper, String>, Error> {
let mut responses = Vec::new();
for object in objects {
let path = format!("{}/{}.ics", path, object.get_id());
let path = format!("{}/{}.ics", path, object.get_uid());
responses.push(
CalendarObjectResource {
object,

View File

@@ -33,7 +33,7 @@ pub async fn handle_sync_collection<C: CalendarStore>(
let mut responses = Vec::new();
for object in new_objects {
let path = format!("{}/{}.ics", path, object.get_id());
let path = format!("{}/{}.ics", path, object.get_uid());
responses.push(
CalendarObjectResource {
object,

View File

@@ -82,10 +82,10 @@ pub async fn put_event<C: CalendarStore>(
debug!("invalid calendar data:\n{body}");
return Err(Error::PreconditionFailed(Precondition::ValidCalendarData));
};
if object.get_id() != object_id {
if object.get_uid() != object_id {
error!(
"Calendar object UID and file name not matching: UID={}, filename={}",
object.get_id(),
object.get_uid(),
object_id
);
return Err(Error::PreconditionFailed(Precondition::MatchingUid));

View File

@@ -21,7 +21,7 @@ pub struct CalendarObjectResource {
impl ResourceName for CalendarObjectResource {
fn get_name(&self) -> String {
format!("{}.ics", self.object.get_id())
format!("{}.ics", self.object.get_uid())
}
}