Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@rachelbaker
Copy link
Member

Initial Controller routes and methods:

  • get all users
  • get single user
  • get me
  • create user
  • update user
  • delete user

Test coverage routes and methods:

  • get all users
  • get single user
  • get current user
  • create user
  • update user
  • delete user

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should live in the server.

@rachelbaker
Copy link
Member Author

Making a note to bring over #608 into this branch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To maximize usefulness, let's build a CSV list of all missing required parameters before finally returning the WP_Error

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 3337e4b

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than creating a one-off method, what if you could register a route to a callback and always specify an argument?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielbachhuber We surely can. To keep the scope of this PR limited I am trying to just "port" over the current Users routes to the new controller style. Okay to do that in another issue/PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rachelbaker
Copy link
Member Author

@WP-API/amigos I have finished my initial pass at migrating the user routes over to our new controller style. Please review the PR for merge.

@rachelbaker rachelbaker added this to the 2.0 milestone Nov 18, 2014
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

@danielbachhuber
Copy link
Member

Let's 🚢 🚢 🚢 :)

I've broken what I want to discuss into separate issues. @WP-API/amigos feel free to do the same

danielbachhuber added a commit that referenced this pull request Nov 18, 2014
Initial pass at new style Users Controller
@danielbachhuber danielbachhuber merged commit 3edd140 into develop Nov 18, 2014
@danielbachhuber danielbachhuber deleted the two-users-controller branch November 18, 2014 04:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants