sailor-module-user

Module User for Sailor

Sailor Module User

Module User for Sailor

Install as dependency in your sailor base application:

sailor install sailor-module-user [--save or --save-dev]
POST /user

The minimum information to create a new user is:

{
    email: "user@sailor.com,"
    password: "yourpassword",
    username: "user1"
}

Check the User Model for know the required, optional and the restriction of each field.

GET /user
GET /user/:id

You can specified the user that you want to recover in the url by id:

GET /user/1

or create a more specified query using url params:

GET /user/?username=user2&email=user2@sailor.com
DELETE /user/:id
POST /user/login

You can login a user with his username:

{
    identifier: "user2",
    password: "yourpassword"
}

or with the email:

{
    identifier: "user2@sailor.com",
    password: "yourpassword"
}
GET /user/logout
GET /user/:id/following

or

GET /user/:id/follower
POST /user/:id/following

with:

{
    follower: 'yourfollowerID' }
GET /user/:id/following/status

with:

{
    follower: 'yourfollowerID' }
DELETE /user/:id/following

with:

{
    follower: 'yourfollowerID' }