diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-04-16 12:42:46 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-04-16 12:42:46 -0400 |
| commit | 54c430282d52b7d5239692fe5939138a1f83ece9 (patch) | |
| tree | ae8e76beefd77ef40eb915edfa8fde5e5a2682c7 /app/index.js | |
| parent | 0f625b3e6b511f4ee1323da30e6280f4880955fc (diff) | |
| parent | eb779beb83ed6e8d000fd0453c9ed5c404327ae4 (diff) | |
Merge branch 'twohustlers' of github.com:okfocus/okcms into twohustlers
Diffstat (limited to 'app/index.js')
| -rw-r--r-- | app/index.js | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/app/index.js b/app/index.js index 01ea33b..d487bd7 100644 --- a/app/index.js +++ b/app/index.js @@ -38,33 +38,18 @@ function OKCMS(options) { path.join(__dirname, '../themes/okadmin/templates'); var debug = options.debug || false; - // Set metadata defaults - // TODO Abstract this out somewhere else - var meta = { - type: 'meta', - get: function() { - return Q.promise(function(resolve, reject) { - db.getMeta().then(function(metadata) { - resolve(assign({}, { - static: '' - }, metadata)); - }).fail(reject); - }); - } + var metaUser = options.meta || {}; + var metaDefault = { + project: 'OKCMS' }; - var adminMeta ={ - type: 'meta', - get: function() { - return Q.promise(function(resolve, reject) { - db.getMeta().then(function(metadata) { - resolve(assign({}, { - static: withoutTrailingSlash(adminPath) - }, metadata)); - }).fail(reject); - }); - } - }; + var meta = assign({ + static: '' + }, metaDefault, metaUser); + + var adminMeta = assign({ + static: withoutTrailingSlash(adminPath) + }, metaDefault, metaUser); var schemaConfig = options.schemas || {}; var resourceConfig = options.resources || []; |
