Commit 0c82b8b2 authored by Evgeniy Zaitsev's avatar Evgeniy Zaitsev
Browse files

v1.0.0

parent b71f8555
......@@ -17,6 +17,7 @@ const lvisEndpoints = require('./lib/lvisEndpoints');
const createTables = require('./lib/createTables');
const logger = require('./lib/logger');
const protocol = require('./middlewares/protocol');
const bodyParser = require('./middlewares/bodyParser');
const errors = require('./middlewares/errors');
const router = require('./router');
......@@ -29,6 +30,7 @@ class SDK {
validate(this.server);
this.server.use(protocol);
this.server.use(bodyParser);
this.server.use(errors);
this.server.use(router.routes());
......
function * protocol(next) {
this.state.protocol = this.config.forceHttps ? 'https' : this.protocol;
this.logger.log(__filename, 'protocol:', this.state.protocol);
yield next;
}
module.exports = protocol;
{
"name": "service-sdk",
"version": "0.0.23",
"version": "1.0.0",
"private": true,
"description": "Service SDK for LViS",
"keywords": [],
......
......@@ -12,7 +12,7 @@ function * getProject() {
tabs.forEach(tab => Object.assign(tab, {
level: 'p',
url: this.protocol + '://' + urlJoin(
url: this.state.protocol + '://' + urlJoin(
this.host, 'lvis', this.state.instance.id, 'project', this.state.project.id, 'tabs', tab.id
)
}));
......@@ -31,7 +31,7 @@ function * getEvent() {
tabs.forEach(tab => Object.assign(tab, {
level: 'e',
url: this.protocol + '://' + urlJoin(
url: this.state.protocol + '://' + urlJoin(
this.host, 'lvis', this.state.instance.id, 'project',
this.state.project.id, 'events', this.state.eventId, 'tabs', tab.id
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment