public async Task <Response <bool> > ForgetPassword(AccountInput input) { ValidateHelper.Begin() .IsEmail(input.Email); _memberSerevice = new MemberSerevice(); return(await _memberSerevice.ForgetPassword(input.Email)); }
public async Task <Response <bool> > UpdatePassword(UpdatePasswordInput input) { //確保資訊安全傳輸有幾種方式 // 1. 以網路層擋,僅限定特定IP讀取 // 2. 透過token協定 ValidateHelper.Begin() .IsPasswordFomat(input.Password) .NotNull(input.Token); _memberSerevice = new MemberSerevice(); return(await _memberSerevice.UpdatePassword(input)); }
public async Task <Response <string> > Login(LoginInput input) { try { ValidateHelper.Begin() .IsPasswordFomat(input.Password) .IsEmail(input.Email); _memberSerevice = new MemberSerevice(); var result = await _memberSerevice.Login(input); return(result); } catch (Exception e) { return(new Response <string>() { Success = false, Message = e.Message, }); } }
public async Task <Response <bool> > IsAccountExistedAsync(AccountInput input) { _memberSerevice = new MemberSerevice(); return(await _memberSerevice.IsAccountExisted(input.Email)); }