Skip to content

Commit

Permalink
Fixes for URL issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanoshea committed May 6, 2015
1 parent 2ee3e38 commit a0f8b4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions frontend/app/controllers/accountController.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ cont.controller('accountController', function ($scope, $filter, $http, $location
if (user == null || ticket == null) {
setTimeout($scope.fetchNext10Best, 2000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/best/'
$http.get('/ppapi/polls/get/best/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser)
.success(function (data, status, headers, config) {
$scope.fetching = false;
Expand Down Expand Up @@ -105,7 +105,7 @@ cont.controller('accountController', function ($scope, $filter, $http, $location
if (user == null || ticket == null) {
setTimeout($scope.fetch10New, 2000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/newest/'
$http.get('/ppapi/polls/get/newest/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser).success(function (data, status, headers, config) {
$scope.fetching = false;
if (data.err) {
Expand All @@ -131,7 +131,7 @@ cont.controller('accountController', function ($scope, $filter, $http, $location
if ($scope.currentPolls == 0) return;
var user = localStorage.getItem('netid');
var ticket = localStorage.getItem('ticket');
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/newest/'
$http.get('/ppapi/polls/get/newest/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser)
.success(function (data, status, headers, config) {
$scope.fetching = false;
Expand Down
12 changes: 6 additions & 6 deletions frontend/app/controllers/feedController.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cont.controller('feedController', function ($scope, $filter, $http, $location) {
if (user == null || ticket == null) {
setTimeout($scope.fetch10Popular, 1000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/popular/'
$http.get('/ppapi/polls/get/popular/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser).success(function (data, status, headers, config) {
$scope.fetching = false;
if (data.err) {
Expand Down Expand Up @@ -83,7 +83,7 @@ cont.controller('feedController', function ($scope, $filter, $http, $location) {
if (user == null || ticket == null) {
setTimeout($scope.fetchNext10Popular, 1000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/popular/'
$http.get('/ppapi/polls/get/popular/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser)
.success(function (data, status, headers, config) {
$scope.fetching = false;
Expand Down Expand Up @@ -111,7 +111,7 @@ cont.controller('feedController', function ($scope, $filter, $http, $location) {
if (user == null || ticket == null) {
setTimeout($scope.fetch10Best, 1000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/best/'
$http.get('/ppapi/polls/get/best/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser).success(function (data, status, headers, config) {
$scope.fetching = false;
if (data.err) {
Expand Down Expand Up @@ -140,7 +140,7 @@ cont.controller('feedController', function ($scope, $filter, $http, $location) {
if (user == null || ticket == null) {
setTimeout($scope.fetchNext10Best, 1000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/best/'
$http.get('/ppapi/polls/get/best/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser)
.success(function (data, status, headers, config) {
$scope.fetching = false;
Expand Down Expand Up @@ -168,7 +168,7 @@ cont.controller('feedController', function ($scope, $filter, $http, $location) {
if (user == null || ticket == null) {
setTimeout($scope.fetch10New, 1000);
}
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/newest/'
$http.get('/ppapi/polls/get/newest/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser).success(function (data, status, headers, config) {
$scope.fetching = false;
if (data.err) {
Expand Down Expand Up @@ -198,7 +198,7 @@ cont.controller('feedController', function ($scope, $filter, $http, $location) {
setTimeout($scope.fetchNext10New, 1000);
}
var user = localStorage.getItem('netid');
$http.get('http://' + $scope.hostname + '/ppapi/polls/get/newest/'
$http.get('/ppapi/polls/get/newest/'
+ user + '/' + ticket + '/' + $scope.currentPolls + onlyUser)
.success(function (data, status, headers, config) {
$scope.fetching = false;
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/partials/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 class="page-head">My Polls</h1>
<a class="vote-submit downvote" ng-click="downVote(poll.pollData.pid, $index)" ng-class="{chosen: poll.userVote == false, unchosen: poll.userVote == true}">bad poll</a>
</div>
<div class="poll-content" ng-click="goToPoll(poll.pollData.pid)">
<a class="poll-content" href="{{'http://' + rootUrl + '#/poll?p=' + poll.pollData.pid}}">
<a class="poll-content" href="{{rootUrl + '#/poll?p=' + poll.pollData.pid}}">
<p class="poll-question">{{poll.pollData.question}}</p>
<p class="poll-choices-preview">Vote: &#8216;{{poll.pollData.choices[0]}}&#8217;<span ng-show="poll.pollData.choices.length > 2">, </span><span ng-show="poll.pollData.choices.length == 2"> vs. </span>&#8216;{{poll.pollData.choices[1]}}&#8217;<span ng-show="poll.pollData.choices.length > 2">, <i class="fa fa-ellipsis-h"></i></span></p>
<div class="poll-meta">
Expand Down

0 comments on commit a0f8b4c

Please sign in to comment.