From 4a49942ae5945de8a16b340ab05aa4b4097f0ea5 Mon Sep 17 00:00:00 2001 From: spezzino Date: Wed, 18 Oct 2017 14:50:20 -0300 Subject: [PATCH] feat(endpoints): automatically strip URL's protocol when creating a new endpoint (#1294) --- app/components/endpoints/endpointsController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/endpoints/endpointsController.js b/app/components/endpoints/endpointsController.js index 9a761a164..01e9670e5 100644 --- a/app/components/endpoints/endpointsController.js +++ b/app/components/endpoints/endpointsController.js @@ -1,6 +1,6 @@ angular.module('endpoints', []) -.controller('EndpointsController', ['$scope', '$state', 'EndpointService', 'EndpointProvider', 'Notifications', 'Pagination', -function ($scope, $state, EndpointService, EndpointProvider, Notifications, Pagination) { +.controller('EndpointsController', ['$scope', '$state', '$filter', 'EndpointService', 'EndpointProvider', 'Notifications', 'Pagination', +function ($scope, $state, $filter, EndpointService, EndpointProvider, Notifications, Pagination) { $scope.state = { uploadInProgress: false, selectedItemCount: 0, @@ -44,7 +44,7 @@ function ($scope, $state, EndpointService, EndpointProvider, Notifications, Pagi $scope.addEndpoint = function() { var name = $scope.formValues.Name; - var URL = $scope.formValues.URL; + var URL = $filter('stripprotocol')($scope.formValues.URL); var PublicURL = $scope.formValues.PublicURL; if (PublicURL === '') { PublicURL = URL.split(':')[0];