using System; using System.Collections.Generic; using System.Threading.Tasks; using LCU.API.Collections.RepoApi.Exceptions; using LCU.Shared.Collections.RepoApiLib.Models; using LCU.Shared.Collections.RepoApiLib.Repositories; using Serilog; namespace LCU.API.Collections.RepoApi.Services { public class RepoStatusChangeService : IRepoStatusChangeService { private readonly IRepoStatusChangeRepository _repoStatusChangeRepository; public RepoStatusChangeService( IRepoStatusChangeRepository repoStatusChangeRepository) { _repoStatusChangeRepository = repoStatusChangeRepository; } public async Task> ListByAccount(int repoId) { try { return await _repoStatusChangeRepository.ListForAccountAsync(repoId); } catch (Exception ex) { Log.Error(ex, "Failure retrieving Repo Account Status Change List"); throw new ServerErrorException(); } } } }