Add descriptions for custom methods on user model
This commit is contained in:
parent
4e1d8c9a4e
commit
4f7a9869e0
|
@ -451,6 +451,7 @@ User.setup = function () {
|
||||||
loopback.remoteMethod(
|
loopback.remoteMethod(
|
||||||
UserModel.login,
|
UserModel.login,
|
||||||
{
|
{
|
||||||
|
description: 'Login a user with username/email and password',
|
||||||
accepts: [
|
accepts: [
|
||||||
{arg: 'credentials', type: 'object', required: true, http: {source: 'body'}},
|
{arg: 'credentials', type: 'object', required: true, http: {source: 'body'}},
|
||||||
{arg: 'include', type: 'string', http: {source: 'query' }, description:
|
{arg: 'include', type: 'string', http: {source: 'query' }, description:
|
||||||
|
@ -471,6 +472,7 @@ User.setup = function () {
|
||||||
loopback.remoteMethod(
|
loopback.remoteMethod(
|
||||||
UserModel.logout,
|
UserModel.logout,
|
||||||
{
|
{
|
||||||
|
description: 'Logout a user with access token',
|
||||||
accepts: [
|
accepts: [
|
||||||
{arg: 'access_token', type: 'string', required: true, http: function(ctx) {
|
{arg: 'access_token', type: 'string', required: true, http: function(ctx) {
|
||||||
var req = ctx && ctx.req;
|
var req = ctx && ctx.req;
|
||||||
|
@ -490,6 +492,7 @@ User.setup = function () {
|
||||||
loopback.remoteMethod(
|
loopback.remoteMethod(
|
||||||
UserModel.confirm,
|
UserModel.confirm,
|
||||||
{
|
{
|
||||||
|
description: 'Confirm a user registration with email verification token',
|
||||||
accepts: [
|
accepts: [
|
||||||
{arg: 'uid', type: 'string', required: true},
|
{arg: 'uid', type: 'string', required: true},
|
||||||
{arg: 'token', type: 'string', required: true},
|
{arg: 'token', type: 'string', required: true},
|
||||||
|
@ -502,6 +505,7 @@ User.setup = function () {
|
||||||
loopback.remoteMethod(
|
loopback.remoteMethod(
|
||||||
UserModel.resetPassword,
|
UserModel.resetPassword,
|
||||||
{
|
{
|
||||||
|
description: 'Reset password for a user with email',
|
||||||
accepts: [
|
accepts: [
|
||||||
{arg: 'options', type: 'object', required: true, http: {source: 'body'}}
|
{arg: 'options', type: 'object', required: true, http: {source: 'body'}}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue