SES-152 Apply feedback

This commit is contained in:
Karol Górzyński 2021-01-20 19:14:42 +01:00
parent dcf17cf1de
commit 22069cae7d

View File

@ -25,12 +25,9 @@ namespace SessionCompanion.Controllers
/// </summary>
/// <returns>Lista sklepikarzy</returns>
[HttpGet("getShopkeepers")]
public async Task<Either<ErrorResponse, List<ShopkeeperViewModel>>> GetShopkeepers()
public async Task<List<ShopkeeperViewModel>> GetShopkeepers()
{
var shopkeepers = _service.Get();
if (!shopkeepers.Any())
return new ErrorResponse() { StatusCode = 204, Message = "No shopkeepers in database" };
return shopkeepers.ToList();
return _service.Get().ToList();
}
}
}