Изменен JobMinResponse
This commit is contained in:
@@ -21,9 +21,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class JobMinResponse
|
public class JobMinResponse
|
||||||
|
{
|
||||||
|
public List<JobMinScheduleResponse> Scheduled { get; set; } = new List<JobMinScheduleResponse>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class JobMinScheduleResponse
|
||||||
{
|
{
|
||||||
public DateTimeOffset StartAt { get; set; }
|
public DateTimeOffset StartAt { get; set; }
|
||||||
|
|
||||||
public required string Script { get; set; }
|
public required string Script { get; set; }
|
||||||
|
|
||||||
|
public required string Name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ namespace PARR.API.Controllers.V1
|
|||||||
|
|
||||||
|
|
||||||
// возврат минимального ответа
|
// возврат минимального ответа
|
||||||
return Ok(mapper.Map<List<JobMinResponse>>(jobsToResponse));
|
return Ok(mapper.Map<JobMinResponse>(jobsToResponse));
|
||||||
|
|
||||||
//try
|
//try
|
||||||
//{
|
//{
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ namespace PARR.API.MappingProfiles
|
|||||||
|
|
||||||
CreateMap<Job, JobGetAllResponse>();
|
CreateMap<Job, JobGetAllResponse>();
|
||||||
|
|
||||||
CreateMap<Job, JobMinResponse>()
|
CreateMap<List<Job>, JobMinResponse>()
|
||||||
|
.ForMember(d => d.Scheduled, o => o.MapFrom(s => s));
|
||||||
|
|
||||||
|
CreateMap<Job, JobMinScheduleResponse>()
|
||||||
.ForMember(d => d.Script, o => o.MapFrom(s => s.ScriptName));
|
.ForMember(d => d.Script, o => o.MapFrom(s => s.ScriptName));
|
||||||
// === Job ===
|
// === Job ===
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user