co-loopback-rest-opt-in

0.1.1 • Public • Published

Loopback REST opt-in

Use this module to choose which automatically generated Loopback REST endpoints to enable rather than which to disable

Opt-in for REST methods

var coOptIn = require('co-loopback-rest-opt-in')
coOptIn.enable(MyModel, [
  'create',
  'findById'
])
// create, deleteById, findById, upsert, find, exists,
// updateAll, createChangeStream, count, findOne,
// updateAttributes

Opt-in for REST methods for related resources

var coOptIn = require('co-loopback-rest-opt-in')
coOptIn.enableRelated(MyModel, 'RelatedModel', [
  'create',
  'destroyById'
])
// create, destroyById, updateById, get, findById,
// delete, count

Readme

Keywords

none

Package Sidebar

Install

npm i co-loopback-rest-opt-in

Weekly Downloads

0

Version

0.1.1

License

ISC

Last publish

Collaborators

  • calleboketoft