From 78b88c66553ae01c41257d51468e1f4f341a22c8 Mon Sep 17 00:00:00 2001 From: Andy PENG Date: Wed, 21 Jun 2017 16:05:35 +0800 Subject: [PATCH] feat: to allow config public for Migration model --- README.md | 6 +++++- lib/index.js | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e77970..4af8602 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The usage is based on the node-db-migrate project. - `enableRest` - [Boolean] : A boolean indicating wether migrate/rollback REST api methods should be exposed on the Migration model. *(default: false)* + [Boolean] : A boolean indicating whether migrate/rollback REST api methods should be exposed on the Migration model. *(default: false)* - `migrationsDir` @@ -48,6 +48,10 @@ The usage is based on the node-db-migrate project. [Array] : ACLs to apply to Migration and MigrationMap models. *(default: [])* +- `public` + + [Boolean] : A boolean indicating whether Migration model should be exposed on the StrongLoop API Explorer. *(default: true)* + ## Running Migrations diff --git a/lib/index.js b/lib/index.js index 12760db..216a74e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -60,8 +60,8 @@ module.exports = function(app, options) { var Migration = require('./models/migration')(MigrationModel, options); var MigrationMap = require('./models/migration-map')(MigrationMapModel, options); - app.model(Migration); - app.model(MigrationMap); + app.model(Migration, options); + app.model(MigrationMap, options); if (!options.enableRest) { if (Migration.disableRemoteMethodByName) {