Example #1
0
        public async Task <CashierDTO> LoginCashierAsync(string email, string password)
        {
            var cashier = await _cashierRepository.LoginAsync(email, CryptoMethods.HashText(password));

            if (cashier != null)
            {
                return(cashier.ProjectedAs <CashierDTO>());
            }
            else
            {
                throw new UnauthorizedAccessException();
            }
        }