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

.create method returning original json array along with response object #32

Open
darkhorse2013 opened this issue Mar 27, 2014 · 0 comments

Comments

@darkhorse2013
Copy link

I have to do a post to an api, in my controller I have the following:

var param = {

    twitter : "dasd",
    nickname : "a",
    yob : '1876',
    description : "I am a test object"

};

matches.create(param, {
    success : function() {

        Ti.API.info("api response:"+JSON.stringify(matches));

    },
    error : function() {
        // something is wrong..
    }
}); 

The api responds with the original object and the object fetched by the server.

api response:[{"twitter":"dasd","nickname":"a","yob":"1876","description":"I am a test object","status":"OK","user":{"id":5188146770730811000,"auth_token":"WayXwJYEMVJaYfv2","facebook_id":"100005169690711","name":"John Smith","email":"[email protected]","description":"this is me"},"Id":"533fd3c2-24e3-b946-222a-e6d2e7235d04"}]

I have written a helper class without using your api (which works), but is based on creating apiRequest object via scratch and I never got the original object back - only the one the api fetches to me.

Is this a bug with your adapter? Thanks

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

No branches or pull requests

1 participant