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

Rest API #4301

Closed
Polarbear2121 opened this issue Oct 28, 2017 · 3 comments
Closed

Rest API #4301

Polarbear2121 opened this issue Oct 28, 2017 · 3 comments

Comments

@Polarbear2121
Copy link

Issue Description

When using the REST API in a GO program,

{"code":111,"error":"schema mismatch for GeneralInfo.customer; expected Pointer<_User> but got String"}

Steps to reproduce

The request has the "Content-Type", "application/json", and X-Parse-Application-Id, and X-Parse-Master-Key set in the header.

In the body, as JSON:
"ACL" : {"WUhEgslMAJ": {"read":true, "write":true}

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) :2.6.5

    • Operating System: Ubuntu 16.04

    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): AWS

  • Database

    • MongoDB version: 3.4.7
@Polarbear2121
Copy link
Author

And customer is set to:

[{"__type":"Pointer", "className":"_User", "objectId": "WUhEgslMAJ"}]

@Polarbear2121
Copy link
Author

Also, I made I typo, the correct call is: "ACL" : {"WUhEgslMAJ": {"read":true, "write":true}}

I got a "Master Key Only" in the ACL entry in the Dashboard.

@Polarbear2121
Copy link
Author

I figure this out. I was using a map[string]string to format the JSON and this was not working. If I pass, the JSON in a string it works.

Thank you, anyway. And, you can close this down.

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

2 participants