Esempio n. 1
0
        public IActionResult InsertClient([FromBody] Client client)
        {
            client.STATUS = "1";
            string actionResult = _repository.RegisterClient(client);

            if (actionResult == "200")
            {
                NotifyClient(client, "Account successfuly created, Welcome to OTANER'S BANK !!!");
                return(Ok("Sucessfuly registered"));
            }
            else if (actionResult == "400")
            {
                return(StatusCode(400, "Client already registered"));
            }
            return(StatusCode(500, "An error occurred"));
        }