API és endpoint kiegészítése
This commit is contained in:
@@ -14,6 +14,7 @@ namespace WorkFlowCheck.API.Controllers
|
||||
{
|
||||
_syncService = syncService;
|
||||
}
|
||||
|
||||
[HttpGet("GetAllCheckPoints")]
|
||||
public async Task<ApiResponseDTO<CheckPointListDTO>> GetAllCheckpoint()
|
||||
{
|
||||
@@ -21,7 +22,7 @@ namespace WorkFlowCheck.API.Controllers
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var checkPointListDTO = await _syncService.GetAllCheckPoint();
|
||||
var checkPointListDTO = await _syncService.GetAllCheckPointAsync();
|
||||
|
||||
if (checkPointListDTO != null)
|
||||
{
|
||||
@@ -37,5 +38,29 @@ namespace WorkFlowCheck.API.Controllers
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
[HttpGet("GetAllCheckListHeader")]
|
||||
public async Task<ApiResponseDTO<List<CheckListTemplateHeaderDTO>>> GetAllCheckListHeader()
|
||||
{
|
||||
var retVal = new ApiResponseDTO<List<CheckListTemplateHeaderDTO>>()
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var response = await _syncService.GetAllCheckListTemplateAsync();
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
|
||||
retVal.IsSuccess = true;
|
||||
retVal.Data = response;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal.IsSuccess = false;
|
||||
retVal.Errors.Add("No data!");
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user