mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
dav: refactor overwrite header
This commit is contained in:
@@ -22,7 +22,7 @@ pub async fn route_import<C: CalendarStore, S: SubscriptionStore>(
|
||||
Path((principal, cal_id)): Path<(String, String)>,
|
||||
user: Principal,
|
||||
State(resource_service): State<CalendarResourceService<C, S>>,
|
||||
overwrite: Overwrite,
|
||||
Overwrite(overwrite): Overwrite,
|
||||
body: String,
|
||||
) -> Result<Response, Error> {
|
||||
if !user.is_principal(&principal) {
|
||||
@@ -103,7 +103,7 @@ pub async fn route_import<C: CalendarStore, S: SubscriptionStore>(
|
||||
|
||||
let cal_store = resource_service.cal_store;
|
||||
cal_store
|
||||
.import_calendar(new_cal, objects, overwrite.is_true())
|
||||
.import_calendar(new_cal, objects, overwrite)
|
||||
.await?;
|
||||
|
||||
Ok(StatusCode::OK.into_response())
|
||||
|
||||
Reference in New Issue
Block a user