Files
2026-04-20 14:47:24 -05:00

35 lines
1.1 KiB
C#

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<IEnumerable<RepoStatusChange>> 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();
}
}
}
}