feat(server/client): update function used to display singular documents
This commit is contained in:
parent
de4ace5858
commit
d51f2793e9
|
|
@ -124,13 +124,13 @@ export const documentService = {
|
|||
getById: (id: string) => {
|
||||
// Use the document list endpoint with pagination to find the specific document
|
||||
// This is a temporary solution until we have a proper document details endpoint
|
||||
return api.get<Document[]>('/documents', {
|
||||
return api.get<PaginatedResponse<Document>>('/documents', {
|
||||
params: {
|
||||
limit: 1000, // Fetch a reasonable amount to find our document
|
||||
offset: 0
|
||||
}
|
||||
}).then(response => {
|
||||
const document = response.data.find(doc => doc.id === id);
|
||||
const document = response.data.documents.find(doc => doc.id === id);
|
||||
if (!document) {
|
||||
throw new Error('Document not found');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,13 +99,15 @@ impl SourceSyncService {
|
|||
info!("WebDAV source sync config: server_url={}, username={}, watch_folders={:?}, file_extensions={:?}, server_type={:?}",
|
||||
config.server_url, config.username, config.watch_folders, config.file_extensions, config.server_type);
|
||||
|
||||
// Requests to list files in a Nextcloud folder might take > 2 minutes
|
||||
// Set timeout to 3 minutes to accommodate large folder structures
|
||||
let webdav_config = WebDAVConfig {
|
||||
server_url: config.server_url,
|
||||
username: config.username,
|
||||
password: config.password,
|
||||
watch_folders: config.watch_folders,
|
||||
file_extensions: config.file_extensions,
|
||||
timeout_seconds: 30,
|
||||
timeout_seconds: 180, // 3 minutes for discover_files_in_folder operations
|
||||
server_type: config.server_type,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue