Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
node-bigstream
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bs
node-bigstream
Commits
69c60b98
Commit
69c60b98
authored
May 21, 2023
by
Kamron Aroonrua
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
response
parent
7d67f820
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
main.js
http-listener/main.js
+0
-1
service-main.js
http-listener/ws/service-main.js
+5
-2
No files found.
http-listener/main.js
View file @
69c60b98
...
@@ -70,7 +70,6 @@ HTTPListener.prototype._http_start = function()
...
@@ -70,7 +70,6 @@ HTTPListener.prototype._http_start = function()
app
.
use
(
context
.
middleware
({
app
.
use
(
context
.
middleware
({
'httpacl'
:
self
.
httpacl
,
'httpacl'
:
self
.
httpacl
,
'jobcaller'
:
self
.
jobcaller
,
'jobcaller'
:
self
.
jobcaller
,
'msgrecv'
:
self
.
msgrecv
,
'httpcb'
:
self
.
httpcb
'httpcb'
:
self
.
httpcb
}));
}));
...
...
http-listener/ws/service-main.js
View file @
69c60b98
...
@@ -21,7 +21,6 @@ var process_req = function(req, res ,method) {
...
@@ -21,7 +21,6 @@ var process_req = function(req, res ,method) {
var
httpacl
=
req
.
context
.
httpacl
;
var
httpacl
=
req
.
context
.
httpacl
;
//var evp = req.context.evp;
//var evp = req.context.evp;
var
jobcaller
=
req
.
context
.
jobcaller
;
var
jobcaller
=
req
.
context
.
jobcaller
;
var
msgrecv
=
req
.
context
.
msgrecv
;
var
httpcb
=
req
.
context
.
httpcb
;
var
httpcb
=
req
.
context
.
httpcb
;
var
j
=
httpacl
.
findJob
(
appkey
,
method
);
var
j
=
httpacl
.
findJob
(
appkey
,
method
);
...
@@ -69,7 +68,7 @@ var process_req = function(req, res ,method) {
...
@@ -69,7 +68,7 @@ var process_req = function(req, res ,method) {
if
(
iopt
.
session
){
resp_msg
.
session
=
session_id
}
if
(
iopt
.
session
){
resp_msg
.
session
=
session_id
}
if
(
Number
(
iopt
.
timeout
)
>
0
){
cb_timeout
=
Number
(
iopt
.
timeout
)}
if
(
Number
(
iopt
.
timeout
)
>
0
){
cb_timeout
=
Number
(
iopt
.
timeout
)}
if
(
iopt
.
response
){
if
(
iopt
.
response
){
cb_response
=
tru
e
cb_response
=
iopt
.
respons
e
resp_msg
.
session
=
session_id
resp_msg
.
session
=
session_id
}
}
req
.
setTimeout
(
cb_timeout
);
req
.
setTimeout
(
cb_timeout
);
...
@@ -86,6 +85,10 @@ var process_req = function(req, res ,method) {
...
@@ -86,6 +85,10 @@ var process_req = function(req, res ,method) {
if
(
cb_response
){
if
(
cb_response
){
httpcb
.
on
(
session_id
,
function
(
msg
){
httpcb
.
on
(
session_id
,
function
(
msg
){
resp_msg
.
response
=
msg
.
data
.
data
;
resp_msg
.
response
=
msg
.
data
.
data
;
if
([
'data'
,
'data_only'
,
'json'
].
includes
(
String
(
cb_response
).
toLocaleLowerCase
())){
resp_msg
(
resp_msg
)
}
respHelper
.
responseOK
(
resp_msg
);
respHelper
.
responseOK
(
resp_msg
);
})
})
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
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