Пример #1
0
 public object GetMerChantUserById(int id)
 {
     try
     {
         return(_MerchantUserService.SingleOrDefault(id, new MerchantUser()));
     }
     catch (Exception ex)
     {
         return(errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString()));
     }
 }
        public object ChangePasswordForClient([FromBody] ChangePasswordModel model)
        {
            try
            {
                MerchantUser userDetails = merchantUsersService.SingleOrDefault(model.ApplicationUserId, new MerchantUser());
                if (validatePasswordForClient(userDetails, model))
                {
                    return(ChangePasswordForClient(userDetails, model));
                }

                return("Old Password is Invalid");
            }
            catch (Exception ex)
            {
                return(errorLogService.InsertToErrorLog(ex, MethodBase.GetCurrentMethod().Name, Request.Headers["UserInfo"].ToString()));
            }
        }