self.submitOwnerForm = function()

in scenarios/aca-internal/bicep/sample-apps/PCF-spring-boot/src/spring-petclinic-api-gateway/src/main/resources/static/scripts/owner-form/owner-form.controller.js [17:29]


        self.submitOwnerForm = function () {
            var id = self.owner.id;

            if (id) {
                $http.put('api/customer/owners/' + id, self.owner).then(function () {
                    $state.go('ownerDetails', {ownerId: ownerId});
                });
            } else {
                $http.post('api/customer/owners', self.owner).then(function () {
                    $state.go('owners');
                });
            }
        };