This commit is contained in:
@@ -59,15 +59,9 @@ public class GlobalSearchController {
|
||||
|
||||
String taskId = globalSearchService.startSearch(request, userId, filesToProcess);
|
||||
|
||||
Optional<GlobalSearchTask> taskOptional = globalSearchTaskRepository.findById(taskId);
|
||||
|
||||
if (taskOptional.isEmpty()) return ResponseEntity.ok().body("Task not found");
|
||||
|
||||
GlobalSearchTask task = taskOptional.orElseThrow();
|
||||
|
||||
response.setTaskId(taskId);
|
||||
response.setStatus(SearchStatus.ACCEPTED.name());
|
||||
response.setTotalFiles(task.getTotalFiles());
|
||||
response.setTotalFiles(filesToProcess.size());
|
||||
} catch (NotFoundAuthToken e) {
|
||||
Map<String, Object> errorData = new HashMap<>();
|
||||
errorData.put("token", tokenHeader);
|
||||
|
||||
Reference in New Issue
Block a user