Update server.js

#1
by maylinejix - opened
Files changed (1) hide show
  1. server.js +2 -2
server.js CHANGED
@@ -36,9 +36,9 @@ app.post('/api/s-playwright', async (req, res) => {
36
 
37
  try {
38
  const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
39
- const executableCode = new AsyncFunction('chromium', 'devices', 'publicDir', 'path', code);
40
 
41
- const result = await executableCode(chromium, devices, publicDir, path);
42
 
43
  const timestamp = Date.now();
44
  const baseUrl = `${req.protocol}://${req.get('host')}`;
 
36
 
37
  try {
38
  const AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
39
+ const executableCode = new AsyncFunction('chromium', 'devices', 'publicDir', 'path', 'fs', code);
40
 
41
+ const result = await executableCode(chromium, devices, publicDir, path, fs);
42
 
43
  const timestamp = Date.now();
44
  const baseUrl = `${req.protocol}://${req.get('host')}`;