Skip to content

Commit

Permalink
Updated methods to instantiate a new deferment with each method call
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Broquist authored and Jonathan Broquist committed Nov 16, 2013
1 parent d36d57e commit 3e15d54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/js/services/GoogleCalendarService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ angular.module('GoogleCalendarService', [], function($provide){

var $scope = angular.element(document).scope();

var defer = $q.defer();

//the url where our node.js application is located
var baseUrl = 'http://localhost:5000';

return {
getEvents: function(){
var defer = $q.defer();

$http.get(baseUrl+'/events').then(function(response){

Expand All @@ -31,6 +30,7 @@ angular.module('GoogleCalendarService', [], function($provide){
return defer.promise;
},
addEvent: function(scheduledDate, endDate, contactInfo){
var defer = $q.defer();

var postData = {
startdate: scheduledDate,
Expand Down

0 comments on commit 3e15d54

Please sign in to comment.