using Shared.DTOs;

namespace Front.Services
{
    public class localService
    {
        private readonly UserAuthenticationDTO _user;
        public localService(UserAuthenticationDTO user)
        {
            _user = user;
        }

        public async Task<bool> OnlineUser()
        {
            if (_user != null && !string.IsNullOrEmpty(_user.Token) && _user.exitDate.AddMinutes(-5) > DateTime.Now)
                return true;
            return false;
        }
    }
}
