Example #1
0
        public async Task Register(string Email, string Password)
        {
            var existingUser = await _queries.GetUserByEmailAsync(Email);

            if (existingUser != null)
            {
                throw new Exception("User already exists.");
            }
            else
            {
                await _queries.RegisterUserAsync(Email, SHA256Service.GetHashedString(Password));
            }
        }