Skip to content

Diffrent result using REST API 'api.parse.com' and 'Local parse server' #503

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

Closed
slickker opened this issue Feb 19, 2016 · 5 comments · Fixed by #6971
Closed

Diffrent result using REST API 'api.parse.com' and 'Local parse server' #503

slickker opened this issue Feb 19, 2016 · 5 comments · Fixed by #6971

Comments

@slickker
Copy link

I try to migrate my local server.
Migration was success.
But I have a problem while use REST API and same parameter.

These are parameters.
include:companyId.logo
limit:100
order:-createdAt
where:{"createdAt":{"$gte":"2016-02-17T15:00:00.000Z"},"visible":{"$ne":false}}

This is url for api.parse.com.
https://api.parse.com/1/classes/Job?include=companyId.logo&limit=100&order=-createdAt&where=%7B%22createdAt%22%3A%7B%22%24gte%22%3A%222016-02-17T15%3A00%3A00.000Z%22%7D%2C%22visible%22%3A%7B%22%24ne%22%3Afalse%7D%7D

This is url for local server.
http://www.easyk.co.kr/parse/classes/Job?include=companyId.logo&limit=100&order=-createdAt&where=%7B%22createdAt%22%3A%7B%22%24gte%22%3A%222016-02-17T15%3A00%3A00.000Z%22%7D%2C%22visible%22%3A%7B%22%24ne%22%3Afalse%7D%7D

Response is OK.
But results are not same.

Another case, results are same.

These are parameters.
include:companyId.logo
limit:200
order:-createdAt
where:{"expired_at":{"$gte":{"__type":"Date","iso":"2016-02-17T15:00:00.000Z"}},"visible":{"$ne":false}}

This is url for api.parse.com.
https://api.parse.com/1/classes/Job?include=companyId.logo&limit=200&order=-createdAt&where=%7B%22expired_at%22%3A%7B%22%24gte%22%3A%7B%22__type%22%3A%22Date%22%2C%22iso%22%3A%222016-02-17T15%3A00%3A00.000Z%22%7D%7D%2C%22visible%22%3A%7B%22%24ne%22%3Afalse%7D%7D

This is url for local server.
http://www.easyk.co.kr/parse/classes/Job?include=companyId.logo&limit=200&order=-createdAt&where=%7B%22expired_at%22%3A%7B%22%24gte%22%3A%7B%22__type%22%3A%22Date%22%2C%22iso%22%3A%222016-02-17T15%3A00%3A00.000Z%22%7D%7D%2C%22visible%22%3A%7B%22%24ne%22%3Afalse%7D%7D

These results are same.

Why not same upper case?
I don't know..
Parse server not fully support REST API?

Thanks,

p.s
I try change to Parse Javascript SDK. This way is OK. I think that 'createdAt' has problem using REST API.

@nlutsenko
Copy link
Contributor

Can you put the actual output in a gist or a text file and attach it here, since we can't quite see the difference based on URLs, since the api keys/app ids are not specified.

@gfosco
Copy link
Contributor

gfosco commented Mar 6, 2016

It doesn't look like the URLs are different, so lets not focus there... If you're still having an issue with the latest version, please open a new issue and describe the differences in the results. Thanks.

@gfosco gfosco closed this as completed Mar 6, 2016
@shebinhere
Copy link

Hi ,
Issue is there for me too. See the attachments . Obviously there is an entry after date 2017-01-02T04:58:01.157Z , greater than query returns nothing . Please help.

screenshot 2017-02-02 11 15 51
screenshot 2017-02-02 11 15 38

@slickker
Copy link
Author

slickker commented Feb 2, 2017

@shebinceino Hi, I have a solution for this problem.
I changed query below.
{"createdAt":{"$gte":today},"visible":{"$ne":false}}
-> {"createdAt":{"$gte":{"__type":"Date", "iso":today}},"visible":{"$ne":false}}
I hope it helps ^^

@shebinhere
Copy link

Thanks. Its working

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 a pull request may close this issue.

4 participants