this is my code:
Auth = 'Bearer ' + accessToken,
resource = JSON.stringify({
'end': {
'date': moment(day).format('YYYY-MM-DD')
},
'start': {
'date': moment(day).format('YYYY-MM-DD')
},
'summary': Meteor.user().profile.name,
'description': Meteor.user().profile.name + 'עושה היום סידור'
});
console.log(resource);
GoogleApi.post('calendar/v3/calendars/some_id/events/', {
'headers': {
'Content-Type': 'application/json',
},
'data' : resource
}, function(err,res){
console.log(res);
console.log(err);
});
threws this error:
Error: failed [400] { "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Missing end time." } ], "code": 400, "message": "Missing end time." } } (…)
any ideas? can it be related to the json issue?
this is my code:
threws this error:
Error: failed [400] { "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Missing end time." } ], "code": 400, "message": "Missing end time." } } (…)any ideas? can it be related to the json issue?