devict/startupwichita.com — pull request #76 by sethetter (2014-04-17 03:30:12+00:00)
Title: Issue #4 - Create backend user resource - routes

### Issue #4 wasn't quite completed with FelixNemis@35bfd4b, this should complete the use of the User resource on the backend.

CRUD routes are provided via the `/api/v1/users` namespace. Session handling is still done with the previously configured passport routes. We can move these to the API later as well if we like.

**POST /api/v1/users** - Sanitized user record that was just created
**GET /api/v1/users** - Array of sanitized user records
**GET /api/v1/users/me** - Currently logged in user record, sanitized
**GET /api/v1/users/:userId** - Single sanitized user record
**PUT /api/v1/users/:userId** - Updated sanitized record if success, errors if not
**DEL /api/v1/users/:userId** - Deleted user record if success, errors if not

### Sanitized User Record
```
{
id: 9h4nf83487yv3,
name: 'Test User',
username: 'testuser',
role: 'Visitor',
bio: 'Some bio info',
featured: false
}
```

**Note**: For `create`, `update`, `delete`, and `me` the sanitized record also includes the user's email, since each require currently logged in user.