loopback/server/middleware/context.js

16 lines
602 B
JavaScript
Raw Normal View History

2016-05-04 00:10:46 +00:00
// Copyright IBM Corp. 2014,2016. All Rights Reserved.
// Node module: loopback
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
var deprecated = require('depd')('loopback');
var g = require('strong-globalize')();
var perRequestContext = require('loopback-context').perRequest;
module.exports = function() {
deprecated(g.f('%s middleware is deprecated. See %s for more details.',
'loopback#context',
'https://docs.strongloop.com/display/APIC/Using%20current%20context'));
return perRequestContext.apply(this, arguments);
};