Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
publics
service-sdk-releases
Commits
0c82b8b2
Commit
0c82b8b2
authored
Oct 27, 2016
by
Evgeniy Zaitsev
Browse files
v1.0.0
parent
b71f8555
Changes
4
Hide whitespace changes
Inline
Side-by-side
app.js
View file @
0c82b8b2
...
...
@@ -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
());
...
...
middlewares/protocol.js
0 → 100644
View file @
0c82b8b2
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
;
package.json
View file @
0c82b8b2
{
"name"
:
"service-sdk"
,
"version"
:
"
0
.0.
23
"
,
"version"
:
"
1
.0.
0
"
,
"private"
:
true
,
"description"
:
"Service SDK for LViS"
,
"keywords"
:
[],
...
...
router/tabs.js
View file @
0c82b8b2
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment