Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: use default parameters #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bugduino
Copy link
Contributor

No description provided.

var parameters = {};
var arg;

api(path, method = 'GET', parameters = {}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not 100% correct. For example, if I call api('/me', {'foo': 'bar'}) it would issue a call to the Facebook API with GET method and parameters {'foo': 'bar'}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method = arguments[1];
parameters = arguments[2];
}

parameters = Ember.$.extend(parameters, {access_token: this.accessToken});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ember.assign might be a better option here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants