fix Syncher whitespace

This commit is contained in:
Mikhail Kuznetsov
2023-06-20 13:51:00 +10:00
parent 9c19e2fb91
commit 37390fa1c8
3 changed files with 4 additions and 5 deletions

View File

@@ -332,7 +332,7 @@ namespace PARR.AIHIT
private async Task<Application?> CreateAppIfNotExistAsync(string appName, ApplicationTypesEnum type)//Application application)
{
if (string.IsNullOrEmpty(appName)) return null;
if (string.IsNullOrEmpty(appName) || string.IsNullOrWhiteSpace(appName)) return null;
var existApp = await appService.GetByNameAsync(appName);
if (existApp != null)

View File

@@ -6,6 +6,7 @@
public DateTimeOffset StartAt { get; set; }
public int FrequencyMinute { get; set; }
public required JobModeResponse JobMode { get; set; }
public required string ScriptName { get; set; }
}
public class JobGetAllResponse : JobBaseResponse

View File

@@ -101,13 +101,11 @@ namespace PARR.API.Controllers.V1
jobsJoined.Add(item);
});
}
jobsJoined.Distinct();
if (!jobsJoined.Any())
return NoContent();
var jobResponse = mapper.Map<List<JobGetAllResponse>>(jobsJoined);
var jobResponse = mapper.Map<List<JobGetAllResponse>>(jobsJoined.Distinct());
return Ok(new Response<List<JobGetAllResponse>>(jobResponse, true, new List<ErrorModel>(), $"{ip},{date}"));
}