private void UpdateServer(SecondaryServerEntity server)
        {
            //without this the password will try and be updated without being decrypted first causing an incorrect password.
            //this prevents the password from being updated.
            server.ServiceAccountPassword = new EncryptionServices().DecryptText(server.ServiceAccountPassword);
            _secondaryServerServices.UpdateSecondaryServer(server);

            SendNotificationEmail(server);
        }
Esempio n. 2
0
        public ActionResultDTO Put(int id, SecondaryServerEntity secondaryServer)
        {
            secondaryServer.Id = id;
            var result = _secondaryServerServices.UpdateSecondaryServer(secondaryServer);

            if (result == null)
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
            }
            return(result);
        }