Auto-update by eslint --fix

This commit is contained in:
Amir Jafarian 2016-04-22 17:09:48 -04:00
parent 144fc8000d
commit 2987655479
5 changed files with 55 additions and 55 deletions

View File

@ -6,7 +6,7 @@ var port = 3000;
var Product = loopback.PersistedModel.extend('product', { var Product = loopback.PersistedModel.extend('product', {
foo: { type: 'string', required: true }, foo: { type: 'string', required: true },
bar: 'string', bar: 'string',
aNum: {type: 'number', min: 1, max: 10, required: true, default: 5} aNum: { type: 'number', min: 1, max: 10, required: true, default: 5 },
}); });
Product.attachTo(loopback.memory()); Product.attachTo(loopback.memory());
app.model(Product); app.model(Product);

View File

@ -39,7 +39,7 @@ function routes(loopbackApplication, options) {
options = _defaults({}, options, { options = _defaults({}, options, {
resourcePath: 'swagger.json', resourcePath: 'swagger.json',
apiInfo: loopbackApplication.get('apiInfo') || {}, apiInfo: loopbackApplication.get('apiInfo') || {},
swaggerUI: true swaggerUI: true,
}); });
var router = new loopback.Router(); var router = new loopback.Router();
@ -57,7 +57,7 @@ function routes(loopbackApplication, options) {
source = req.originalUrl.replace(/\/config.json(\?.*)?$/, ''); source = req.originalUrl.replace(/\/config.json(\?.*)?$/, '');
} }
res.send({ res.send({
url: urlJoin(source, '/' + options.resourcePath) url: urlJoin(source, '/' + options.resourcePath),
}); });
}); });

View File

@ -56,7 +56,7 @@ $(function() {
return pathCompare !== 0 ? return pathCompare !== 0 ?
pathCompare : pathCompare :
methodOrder.indexOf(a.method) - methodOrder.indexOf(b.method); methodOrder.indexOf(a.method) - methodOrder.indexOf(b.method);
} },
}); });
$('#explore').click(setAccessToken); $('#explore').click(setAccessToken);

View File

@ -117,7 +117,7 @@ describe('explorer', function() {
beforeEach(function setupExplorerWithUiDirs() { beforeEach(function setupExplorerWithUiDirs() {
app = loopback(); app = loopback();
explorer(app, { explorer(app, {
uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')] uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')],
}); });
}); });
@ -143,7 +143,7 @@ describe('explorer', function() {
beforeEach(function setupExplorerWithoutUI() { beforeEach(function setupExplorerWithoutUI() {
app = loopback(); app = loopback();
explorer(app, { explorer(app, {
swaggerUI: false swaggerUI: false,
}); });
}); });
@ -200,7 +200,7 @@ describe('explorer', function() {
it('should allow `uiDirs` to be defined as an Array', function(done) { it('should allow `uiDirs` to be defined as an Array', function(done) {
explorer(app, { explorer(app, {
uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')] uiDirs: [path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui')],
}); });
request(app).get('/explorer/') request(app).get('/explorer/')
@ -212,7 +212,7 @@ describe('explorer', function() {
it('should allow `uiDirs` to be defined as an String', function(done) { it('should allow `uiDirs` to be defined as an String', function(done) {
explorer(app, { explorer(app, {
uiDirs: path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui') uiDirs: path.resolve(__dirname, 'fixtures', 'dummy-swagger-ui'),
}); });
request(app).get('/explorer/') request(app).get('/explorer/')