Jó kis javítás, fejlesztés TESZT-hez

This commit is contained in:
2025-03-31 19:31:22 +02:00
parent a7e913b3ee
commit 61dd5bc9a1
18 changed files with 299 additions and 88 deletions
@@ -12,13 +12,14 @@ namespace WorkFlowCheck.API.Controllers
public class SyncController : ControllerBase
{
private ISyncService _syncService;
public SyncController(ISyncService syncService)
private INumberGeneratorService _numberGeneratorService;
public SyncController(ISyncService syncService,INumberGeneratorService numberGeneratorService)
{
_syncService = syncService;
_numberGeneratorService = numberGeneratorService;
}
[HttpGet("GetCheckPoint/{id}")]
public async Task<ApiResponseDTO<CheckPointDTO>> GetCheckpointAsync(int id)
{
@@ -315,7 +316,29 @@ namespace WorkFlowCheck.API.Controllers
return retVal;
}
[HttpGet("GetAllNumbergenerators")]
public async Task<ApiResponseDTO<List<NumberGeneratorTemplateDTO>>> GetAllNumbergeneratorsAsync()
{
var retVal = new ApiResponseDTO<List<NumberGeneratorTemplateDTO>>()
{
IsSuccess = true,
};
var locationListDTO = await _numberGeneratorService.GetAllNumbergeneratorsAsync();
if (locationListDTO != null)
{
retVal.IsSuccess = true;
retVal.Data = locationListDTO;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
}