adding webdav features

This commit is contained in:
DioCrafts
2025-04-04 21:31:41 +02:00
parent e3256bb3b5
commit ba3ef2a530
21 changed files with 3358 additions and 960 deletions
@@ -5,13 +5,9 @@ use axum::{
response::IntoResponse,
Json,
};
use serde::{Deserialize, Serialize};
use tracing::{error, info};
use uuid::Uuid;
use crate::application::ports::favorites_ports::FavoritesUseCase;
use crate::application::dtos::favorites_dto::FavoriteItemDto;
use crate::common::errors::{Result, DomainError, ErrorKind};
/// Handler for favorite-related API endpoints
pub async fn get_favorites(
+2 -2
View File
@@ -8,7 +8,7 @@ pub mod search_handler;
pub mod share_handler;
pub mod favorites_handler;
pub mod recent_handler;
pub mod webdav_handler;
/// Tipo de resultado para controladores de API
pub type ApiResult<T> = Result<T, (axum::http::StatusCode, String)>;
pub type ApiResult<T> = Result<T, (axum::http::StatusCode, String)>;
@@ -5,7 +5,7 @@ use axum::{
response::IntoResponse,
Json,
};
use serde::{Deserialize, Serialize};
use serde::Deserialize;
use tracing::{error, info};
use crate::application::ports::recent_ports::RecentItemsUseCase;
File diff suppressed because it is too large Load Diff
+9
View File
@@ -630,6 +630,15 @@ pub fn create_api_routes(
if trash_service.is_some() {
tracing::info!("Trash service is available - trash view is functional");
}
// Add WebDAV routes if needed
let webdav_enabled = true; // In production, you'd read this from a config
let router = if webdav_enabled {
use crate::interfaces::api::handlers::webdav_handler;
router.merge(webdav_handler::webdav_routes())
} else {
router
};
router
.layer(CompressionLayer::new())