コード例 #1
0
 public async Task<ApiJsonResult> ForgotPassword(LoginParams email)
 {
     try {
         await new AccountManager().ForgotPassword(email.Email);
         return new ApiJsonResult { Success = true };
     }
     catch (Exception ex) {
         return ProcessException(ex);
     }
 }
コード例 #2
0
 public async Task<ApiJsonResult> Login(LoginParams loginParams)
 {
     try {
         var user = await new AccountManager().Login(loginParams);
         SetAuthenticatedUser(user.Id, loginParams.IsKeepSignIn);
         return new ApiJsonResult { Data = user, Success = true };
     }
     catch (Exception ex) {
         return ProcessException(ex);
     }
 }