Skip to content

Instantly share code, notes, and snippets.

@yoterpa
Last active March 14, 2017 20:05
Show Gist options
  • Save yoterpa/60f7f69c9966f08834cb514b63e131d0 to your computer and use it in GitHub Desktop.
Save yoterpa/60f7f69c9966f08834cb514b63e131d0 to your computer and use it in GitHub Desktop.
Copy of User class in Parse-Server

Issue Description

I was trying to create a user with just email and password using curl, but I forgot to add underbar before User class in the request. It created another User class, created the user in that class and returned the objectId in response.

What's strange is that Parse-dashboard shows this new User class with copies of all the rows and a few columns, but I couldn't find my newly created user there. I tried to delete this User class, but you have to delete all the rows in a class before deleting it. Just to be safe, I started with just one and as I suspected it deleted the user from the default User class as well.

What I think is either it should not be allowed to create a 'without underbar' versions of the default classes or if it is the dashboard shouldn't link the created class with the default class.

Steps to reproduce

  • Run the following curl command from terminal:
curl -X POST -H "X-Parse-Application-Id: 0000" \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"test"}' \
https://www.myawsserver.com/parse/classes/User
  • Check the parse dashboard for the created user.

Expected Results

Another User class in the dashboard with just the newly created user.

Actual Outcome

I got the objectId and createdAt in my response. But there was no user created in the new User class. The new User class contained copy of all the rows but only with the following columns: objectId, createdAt, updatedAt, ACL, email and password.

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.3.2
    • Operating System: Ubuntu 14.04
    • Hardware: AWS EC2
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): AWS
  • Database

    • MongoDB version: 3.4.1
    • Storage engine: WiredTiger
    • Hardware: AWS EC2
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): AWS

Logs/Trace

No Errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment