feat(endpoints): automatically strip URL's protocol when creating a new endpoint (#1294)

pull/1308/head
spezzino 2017-10-18 14:50:20 -03:00 committed by Anthony Lapenna
parent c9ccdaaea4
commit 4a49942ae5
1 changed files with 3 additions and 3 deletions

View File

@ -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];