0.1.0 • Published 10 years ago

sailor-module-group v0.1.0

Weekly downloads
3
License
MIT
Repository
-
Last release
10 years ago

Sailor Module Group

Build Status Dependency status Dev Dependencies Status NPM Status

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: "kiko@sailor.com",
	password: "password"
}

Remove an User

POST group/1/user"

and send the information about the user, like:

{
	email: "kiko@sailor.com",
	password: "password"
}

License

MIT © sailorjs