예제 #1
0
        public async Task <Response <bool> > Register(RegisterInput input)
        {
            var isExisted = await IsAccountExisted(input.Email);

            if (!isExisted.Success || isExisted.Data)
            {
                return(isExisted);                                      //失敗|帳號已存在
            }
            var salt = GetRandomStringByGuid(5);

            input.Password = PasswordHash(input.Password, salt);
            return(await _memberRepository.CreateAccount(input, salt));
        }