adding webdav features
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user