using e_suite.API.Common;
using e_suite.API.Common.repository;

namespace e_suite.Modules.UserManager;

public class UserManagerMaintenance : IUserManagerMaintenance
{
    private readonly IUserManagerRepository _userManagerRepository;

    public UserManagerMaintenance(IUserManagerRepository userManagerRepository)
    {
        _userManagerRepository = userManagerRepository;
    }

    public async Task ClearOldEmailActions()
    {
        await _userManagerRepository.DeleteExpiredEmailUserActions();
    }

    public async Task ClearOldSingleUserGuids()
    {
        await _userManagerRepository.DeleteExpiredSingleUseGuids();
    }
}