24 lines
539 B
JavaScript
24 lines
539 B
JavaScript
|
var configRegistry = require('./../../../config-registry');
|
||
|
|
||
|
module.exports = (function () {
|
||
|
|
||
|
return function ServerConfigTViewPlugin() {
|
||
|
|
||
|
this.configPlugin = function (ctx) {
|
||
|
ctx.key = 'serverConfigTView';
|
||
|
ctx.description = 'Exports tentity tviews.';
|
||
|
ctx.localDir = __dirname;
|
||
|
ctx.localConfigTemplate = 'config-tview.json';
|
||
|
};
|
||
|
|
||
|
this.configApi = function(ctx) {
|
||
|
ctx.server.get(ctx.createSlugApiTEntityBase(),ctx.renderFunctionJSON(function () {
|
||
|
return {
|
||
|
tview: ctx.tview
|
||
|
}
|
||
|
}));
|
||
|
};
|
||
|
};
|
||
|
})();
|
||
|
|