Skip to content

Rest API #4301

Description

@Polarbear2121

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

Activity

  1. Polarbear2121 commented on Oct 28, 2017

    @Polarbear2121
    Author

    And customer is set to:

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

  2. Polarbear2121 commented on Oct 28, 2017

    @Polarbear2121
    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.

  3. Polarbear2121 commented on Oct 28, 2017

    @Polarbear2121
    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

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