parse-server: Schema API can create a duplicate User class

Issue Description

You are able to duplicate User class by using Parse REST Schema API.

Steps to reproduce

Run this:

curl -X POST  \
-H "X-Parse-Application-Id: YOUR_APPLICATION_ID"  \
-H "X-Parse-Master-Key: YOUR_MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
http://127.0.0.1:1337/1/schemas/User

Expected Results

Get error: {"code":103,"error":"Class User already exists."}

Actual Outcome

New User class is created, and if you check parse-dashboard, there are two User classes that exist and work in parallel.

But if you try to run the curl again now, you will get the expected result.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (12 by maintainers)

Most upvoted comments

You will also probably need to remove the User document from the _SCHEMA collection and restart your server and dashboard