mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 10:32:19 +00:00
Reorganise resource methods
This commit is contained in:
@@ -10,6 +10,8 @@ use std::sync::Arc;
|
||||
use strum::{EnumString, VariantNames};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use super::methods::{get_event, put_event};
|
||||
|
||||
pub struct CalendarObjectResourceService<C: CalendarStore + ?Sized> {
|
||||
pub cal_store: Arc<RwLock<C>>,
|
||||
pub path: String,
|
||||
@@ -130,4 +132,9 @@ impl<C: CalendarStore + ?Sized> ResourceService for CalendarObjectResourceServic
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn actix_additional_routes(res: actix_web::Resource) -> actix_web::Resource {
|
||||
res.get(get_event::<C>).put(put_event::<C>)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user