Controller javítása userId-vel
This commit is contained in:
@@ -3,6 +3,7 @@ using Serilog;
|
||||
using WorkFlowCheck.BL.Services;
|
||||
using WorkFlowCheck.BL.Services.Interfaces;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using WorkFlowCheck.DL.Entities;
|
||||
|
||||
namespace WorkFlowCheck.API.Controllers
|
||||
{
|
||||
@@ -225,14 +226,37 @@ namespace WorkFlowCheck.API.Controllers
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("GetAllCheckListTemplateHeader")]
|
||||
public async Task<ApiResponseDTO<List<CheckListTemplateHeaderDTO>>> GetAllCheckListTemplateHeaderAsync()
|
||||
[HttpGet("GetAllCheckListTemplateHeader/{userId}")]
|
||||
public async Task<ApiResponseDTO<List<CheckListTemplateHeaderDTO>>> GetAllCheckListTemplateHeaderAsync(int userId)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<List<CheckListTemplateHeaderDTO>>()
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var response = await _syncService.GetAllCheckListTemplateAsync();
|
||||
var response = await _syncService.GetAllCheckListTemplateAsync(userId);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
|
||||
retVal.IsSuccess = true;
|
||||
retVal.Data = response;
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal.IsSuccess = false;
|
||||
retVal.Errors.Add("No data!");
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
[HttpGet("GetAllCheckListHeader/{userId}")]
|
||||
public async Task<ApiResponseDTO<List<CheckListHeaderDTO>>> GetAllCheckListHeaderAsync(int userId)
|
||||
{
|
||||
var retVal = new ApiResponseDTO<List<CheckListHeaderDTO>>()
|
||||
{
|
||||
IsSuccess = true,
|
||||
};
|
||||
var response = await _syncService.GetAllCheckListAsync(userId);
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
@@ -249,10 +273,10 @@ namespace WorkFlowCheck.API.Controllers
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user