Egy kis lapozás ...

This commit is contained in:
2025-04-03 17:07:12 +02:00
parent d5e11bc2e4
commit fa48365d98
3 changed files with 94 additions and 1 deletions
@@ -43,6 +43,29 @@ namespace WorkFlowCheck.API.Controllers
return retVal;
}
[HttpGet("DeleteCheckPoint/{id}")]
public async Task<ApiResponseDTO<bool>> DeleteCheckpointAsync(int id)
{
var retVal = new ApiResponseDTO<bool>()
{
IsSuccess = true,
};
var response = await _syncService.DeleteCheckPointAsync(id);
if (response != null)
{
retVal.IsSuccess = true;
retVal.Data = response;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
[HttpGet("GetAllCheckPoints")]
public async Task<ApiResponseDTO<List<CheckPointDTO>>> GetAllCheckpointsAsync()
{
@@ -132,6 +155,29 @@ namespace WorkFlowCheck.API.Controllers
return retVal;
}
[HttpGet("DeleteEquipment/{id}")]
public async Task<ApiResponseDTO<bool>> DeleteEquipmentAsync(int id)
{
var retVal = new ApiResponseDTO<bool>()
{
IsSuccess = true,
};
var response = await _syncService.DeleteEquipmentAsync(id);
if (response != null)
{
retVal.IsSuccess = true;
retVal.Data = response;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
[HttpGet("GetAllEquipments")]
public async Task<ApiResponseDTO<List<EquipmentDTO>>> GetAllEquipmentsAsync()
{
@@ -201,6 +247,29 @@ namespace WorkFlowCheck.API.Controllers
return retVal;
}
[HttpGet("DeleteLocation/{id}")]
public async Task<ApiResponseDTO<bool>> DeleteLocationAsync(int id)
{
var retVal = new ApiResponseDTO<bool>()
{
IsSuccess = true,
};
var response = await _syncService.DeleteLocationAsync(id);
if (response != null)
{
retVal.IsSuccess = true;
retVal.Data = response;
}
else
{
retVal.IsSuccess = false;
retVal.Errors.Add("No data!");
}
return retVal;
}
[HttpGet("GetAllLocations")]
public async Task<ApiResponseDTO<List<LocationDTO>>> GetAllLocationsAsync()
{