milesrichardson / ParsePy

A relatively up-to-date fork of ParsePy, the Python wrapper for the Parse.com API. Originally maintained by @dgrtwo
MIT License
515 stars 184 forks source link

Updated users endpoint to _User #148

Closed daxeel closed 7 years ago

daxeel commented 8 years ago

Old "user" endpoint was creating new class in my project instead of signing up user in default parse "User" class. "_User" will add user to parse's default User class instead of creating another class named "user".

milesrichardson commented 8 years ago

This looks good at first glance, but I'd like to hear more, especially as it seems it could break backwards compatibility.

Specifically, is there a difference between the /users endpoint and the /_User endpoint which necessitates this change? Reading the code of parse-server, it seems the two endpoints should return the same.

parse-server routes /users to handleFind() on the _User class, the same function called for the /classes/_User endpoint.

The two routes in parse-server:

/classes/_User:

`    this.route('GET', '/classes/:className', (req) => { return this.handleFind(req); });

/users:

     this.route('GET', '/users', req => { return this.handleFind(req); });`

Both endpoints call the same function.