refactor from file to resource

This commit is contained in:
Lennart
2024-09-29 14:42:56 +02:00
parent e9e16a71f0
commit f2f66c95d2
8 changed files with 25 additions and 25 deletions

View File

@@ -221,10 +221,10 @@ impl Resource for CalendarResource {
impl<C: CalendarStore + ?Sized> ResourceService for CalendarResourceService<C> {
type MemberType = EventResource;
type PathComponents = (String, String); // principal, calendar_id
type File = CalendarResource;
type Resource = CalendarResource;
type Error = Error;
async fn get_file(&self) -> Result<Self::File, Error> {
async fn get_resource(&self) -> Result<Self::Resource, Error> {
let calendar = self
.cal_store
.read()
@@ -270,7 +270,7 @@ impl<C: CalendarStore + ?Sized> ResourceService for CalendarResourceService<C> {
})
}
async fn save_file(&self, file: Self::File) -> Result<(), Self::Error> {
async fn save_resource(&self, file: Self::Resource) -> Result<(), Self::Error> {
self.cal_store
.write()
.await
@@ -283,7 +283,7 @@ impl<C: CalendarStore + ?Sized> ResourceService for CalendarResourceService<C> {
Ok(())
}
async fn delete_file(&self, use_trashbin: bool) -> Result<(), Self::Error> {
async fn delete_resource(&self, use_trashbin: bool) -> Result<(), Self::Error> {
self.cal_store
.write()
.await