Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Commit

Permalink
oopsie:
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kaplowitz committed Feb 10, 2016
2 parents 8ac0424 + 2060184 commit ad1e8c8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ node_modules
bower_components
.idea
*.apk
npm-debug.log
npm-debug.log.*
4 changes: 2 additions & 2 deletions www/js/controllers/search-controller.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
angular.module('pvta.controllers').controller('SearchController', function($scope, $ionicFilterBar, $resource, RouteList, StopList, Stops){
angular.module('pvta.controllers').controller('SearchController', function($scope, $ionicFilterBar, $resource, RouteList, StopList, Stops, Avail){
var filterBarInstance;
function getItems () {
$scope.all = [];
Expand All @@ -24,7 +24,7 @@ angular.module('pvta.controllers').controller('SearchController', function($scop
return routes;
}
if(RouteList.isEmpty()){
var routes = $resource('http://bustracker.pvta.com/infopoint/rest/routes/getallroutes').query({}, function(){
var routes = $resource(Avail + '/routes/getallroutes').query({}, function(){
routes = prepareRoutes(routes);
RouteList.pushEntireList(routes);
});
Expand Down
40 changes: 22 additions & 18 deletions www/js/services.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
angular.module('pvta.services', ['ngResource'])

.factory('Vehicle', function ($resource) {
return $resource('http://bustracker.pvta.com/infopoint/rest/vehicles/get/:vehicleId');
.factory('Avail', function(){
return 'http://bustracker.pvta.com/infopoint/rest';
})

.factory('Route', function ($resource) {
return $resource('http://bustracker.pvta.com/infopoint/rest/routedetails/get/:routeId');
.factory('Vehicle', function ($resource, Avail) {
return $resource(Avail + '/vehicles/get/:vehicleId');
})

.factory('Routes', function ($resource) {
return $resource('http://bustracker.pvta.com/infopoint/rest/routes/getvisibleroutes');
.factory('Route', function ($resource, Avail) {
return $resource(Avail + '/routedetails/get/:routeId');
})

.factory('Stop', function ($resource) {
return $resource('http://bustracker.pvta.com/infopoint/rest/stops/get/:stopId');
.factory('Routes', function ($resource, Avail) {
return $resource(Avail + '/routes/getvisibleroutes');
})

.factory('Stops', function($resource){
return $resource('http://bustracker.pvta.com/infopoint/rest/stops/getallstops');
.factory('Stop', function ($resource, Avail) {
return $resource(Avail + '/stops/get/:stopId');
})

.factory('RouteVehicles', function($resource){
return $resource('http://bustracker.pvta.com/infopoint/rest/vehicles/getallvehiclesforroute?routeId=:routeId')
.factory('Stops', function ($resource, Avail){
return $resource(Avail + '/stops/getallstops');
})

.factory('StopDeparture', function ($resource) {
return $resource('http://bustracker.pvta.com/infopoint/rest/stopdepartures/get/:stopId');
.factory('RouteVehicles', function ($resource, Avail){
return $resource(Avail + '/vehicles/getallvehiclesforroute?routeId=:routeId')
})

.factory('Messages', function ($resource) {
return $resource('http://bustracker.pvta.com/infopoint/rest/publicmessages/getcurrentmessages');
.factory('StopDeparture', function ($resource, Avail) {
return $resource(Avail + '/stopdepartures/get/:stopId');
})
.factory('SimpleRoute', function($resource){
return $resource('http://bustracker.pvta.com/infopoint/rest/routes/get/:routeId');

.factory('Messages', function ($resource, Avail) {
return $resource(Avail + '/publicmessages/getcurrentmessages');
})
.factory('SimpleRoute', function ($resource, Avail){
return $resource(Avail + '/routes/get/:routeId');
})


Expand Down

0 comments on commit ad1e8c8

Please sign in to comment.