StartupAPI / users

:zap: User management tool to be used in on-line projects. Includes admin dashboard.
http://www.StartupAPI.com/
MIT License
60 stars 24 forks source link

New POST /v1/user/update API endpoint #295

Open sergeychernyshev opened 3 years ago

sergeychernyshev commented 3 years ago

Create a new endpoint for updating user's info.

POST /v1/user/update

Parameters:

Returns no object if successful

Throws exceptions:

Existing form-based implementation can be found here: https://github.com/StartupAPI/users/blob/master/edit.php#L53-L90

Move email validation into User::setEmail() and name validation into User::setName() methods instead of UI, create new validation exception classes and throw exceptions to catch in the UI and APIs. Update edit.php to also use same exceptions.