From bc173e1a3f5980fed68f4c84e9722300ce88d8e3 Mon Sep 17 00:00:00 2001 From: dularion Date: Thu, 11 Apr 2019 21:40:38 +0200 Subject: [PATCH] fix regression due to angular upgrade #773 --- .../streama/controllers/settings-settings-ctrl.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/grails-app/assets/javascripts/streama/controllers/settings-settings-ctrl.js b/grails-app/assets/javascripts/streama/controllers/settings-settings-ctrl.js index 15fec2e6e..deda3136d 100644 --- a/grails-app/assets/javascripts/streama/controllers/settings-settings-ctrl.js +++ b/grails-app/assets/javascripts/streama/controllers/settings-settings-ctrl.js @@ -31,13 +31,12 @@ angular.module('streama').controller('settingsSettingsCtrl', $scope.changeValue(settings); $scope.loading = true; - apiService.settings.validateSettings(settings) - .success(function (data) { + apiService.settings.validateSettings(settings).then(function (response) { + var data = response.data; alertify.success(data.message || 'validation successful'); settings.valid = true; $scope.loading = false; - }) - .error(function (data) { + }, function (data) { alertify.error(data.message); settings.invalid = true; $scope.loading = false;