co-loopback-rest-opt-in
v0.1.1
Published
Opt-in rather than opt-out for generated Loopback REST endpoints
Downloads
2
Readme
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