RaBU1234 commited on
Commit
ff99cb4
·
verified ·
1 Parent(s): 175235d

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +9 -11
server.js CHANGED
@@ -159,18 +159,16 @@ app.get('/api/sandbox/:sandboxId/cmds/:cmdId/logs', (req, res) => {
159
  res.end();
160
  return;
161
  }
162
-
163
- if (command.logs && command.logs.length > 0) {
164
- command.logs.forEach(log => {
165
- res.write(JSON.stringify({
166
- data: log.data,
167
- stream: log.stream,
168
- timestamp: log.timestamp
169
- }) + '
170
  ');
171
- });
172
- }
173
-
174
  sandboxManager.addLogStream(sandboxId, cmdId, res);
175
 
176
  const keepAlive = setInterval(() => {
 
159
  res.end();
160
  return;
161
  }
162
+ if (command.logs && command.logs.length > 0) {
163
+ command.logs.forEach(log => {
164
+ res.write(JSON.stringify({
165
+ data: log.data,
166
+ stream: log.stream,
167
+ timestamp: log.timestamp
168
+ }) + '
 
169
  ');
170
+ });
171
+ }
 
172
  sandboxManager.addLogStream(sandboxId, cmdId, res);
173
 
174
  const keepAlive = setInterval(() => {