Update rest.js

This commit is contained in:
wolrajhti 2018-05-25 11:28:30 +02:00 committed by GitHub
parent 30556d1b63
commit 8d09e5782f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -29,7 +29,7 @@ module.exports = rest;
* ```
* For more information, see [Exposing models over a REST API](http://loopback.io/doc/en/lb2/Exposing-models-over-REST.html).
* @header loopback.rest([options])
* @property {String} [currentUserLiteral] literal for the current user.
* @property {String} [currentUserLiteral] String literal for the current user.
*/
function rest(options) {
@ -55,11 +55,7 @@ function rest(options) {
if (app.isAuthEnabled) {
var AccessToken = registry.getModelByType('AccessToken');
handlers.push(loopback.token({
currentUserLiteral: currentUserLiteral,
model: AccessToken,
app: app
}));
handlers.push(loopback.token({currentUserLiteral: currentUserLiteral, model: AccessToken, app: app}));
}
handlers.push(function(req, res, next) {