Skip to content

sitegate/user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sitegate-user

Dependency Status Build Status

Methods

getById(id, callback)

Usage

User.getById('550b42003376b4ec12fbbcb1', function(err, user) {
  console.log(user.name);
});

Arguments

Name Type Description
id string The ID of the user.
[options] object A hash with options.
Where
  • fields - {Array.<string>} - List of fields to be returned.
cb function(err, user) A callback function to receive the user.

update(id, updatedFields, [callback])

Usage

User.update('550b42003376b4ec12fbbcb1', {
  name: 'New name'
}, function (err, user) {
  console.log(user.name);
});

Arguments

Name Type Description
id string The ID of the user that has to be updated.
updatedFields object A hash of the fields that have to be updated with the new values.
cb function(err, user) A callback function to receive the updated user.

License

The MIT License (MIT)

About

A user microservice for SiteGate.

Resources

Stars

Watchers

Forks

Packages

No packages published