Skip to content

calendar json issue #38

Description

@amitrahav

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions