public IHttpActionResult Update(OrgUnitRegistration ou) { bool isValid = ValidateOU(ou); if (isValid) { try { OrgUnitDao.Save(ou.ConvertToV1_1(), OperationType.UPDATE); return(Ok(ou)); } catch (Exception ex) { log.Error(Messages.GetUserMessage(Messages.UPDATE_FAILED), ex); } } return(BadRequest()); }
public IHttpActionResult Update(UserRegistration user) { bool isValid = ValidateUser(user); if (isValid) { try { userDao.Save(user, OperationType.UPDATE); return(Ok(user)); } catch (Exception ex) { log.Error(messages.GetUserMessage(messages.UPDATE_FAILED), ex); } } return(BadRequest()); }