Add descriptions for custom methods on user model

This commit is contained in:
Raymond Feng 2014-07-18 22:48:07 -07:00
parent 4e1d8c9a4e
commit 4f7a9869e0
1 changed files with 4 additions and 0 deletions

View File

@ -451,6 +451,7 @@ User.setup = function () {
loopback.remoteMethod(
UserModel.login,
{
description: 'Login a user with username/email and password',
accepts: [
{arg: 'credentials', type: 'object', required: true, http: {source: 'body'}},
{arg: 'include', type: 'string', http: {source: 'query' }, description:
@ -471,6 +472,7 @@ User.setup = function () {
loopback.remoteMethod(
UserModel.logout,
{
description: 'Logout a user with access token',
accepts: [
{arg: 'access_token', type: 'string', required: true, http: function(ctx) {
var req = ctx && ctx.req;
@ -490,6 +492,7 @@ User.setup = function () {
loopback.remoteMethod(
UserModel.confirm,
{
description: 'Confirm a user registration with email verification token',
accepts: [
{arg: 'uid', type: 'string', required: true},
{arg: 'token', type: 'string', required: true},
@ -502,6 +505,7 @@ User.setup = function () {
loopback.remoteMethod(
UserModel.resetPassword,
{
description: 'Reset password for a user with email',
accepts: [
{arg: 'options', type: 'object', required: true, http: {source: 'body'}}
],