sailor-module-group
v0.1.0
Published
Support create groups between Users
Downloads
4
Readme
Sailor Module Group
Support create group between Users
Install
npm install sailor-module-group
NOTE: This module need a model user. Use sailor-module-user
or other module that declare it.
API
Basic CRUD
Register new Group
POST /group
The minimum information to create a new group is:
{
name: 'yourGroupName'
}
Others attributes can be declares when you create a group. check Group model for more information.
Find all group
GET /group
Find One Group
GET /group/:id
You can specified the user that you want to recover in the url by id:
GET /group/1
or create a more specified query using url params:
GET /group/?private=true
GET /group/?private=true?where={"tags":{"contains":"funny"}}
Destroy an Group
DELETE /group/:id
Management
Add a new User
POST group/1/user"
and send the information about the user, like:
{
email: "[email protected]",
password: "password"
}
Remove an User
POST group/1/user"
and send the information about the user, like:
{
email: "[email protected]",
password: "password"
}
License
MIT © sailorjs