Esempio n. 1
0
        public IActionResult GetFirstDiscrepancyInTheFile(string fileName)
        {
            var folderDiffModel = folderComparisonService.Compare();
            var fileModel       = folderDiffModel.Different.FirstOrDefault(f => f.Name.Equals(fileName, StringComparison.OrdinalIgnoreCase));

            // Any fileName but the ones considered "different" produces 404 "NotFound" response.
            if (fileModel == null)
            {
                return(NotFound());
            }

            try
            {
                var result = fileComparisonService.GetFileDifference(fileName);
                return(Ok(result));
            }
            catch
            {
                return(Conflict());
            }
        }
Esempio n. 2
0
 public IActionResult GetFilderDifference()
 {
     return(Ok(comparisonService.Compare()));
 }