smgc commited on
Commit
4246750
1 Parent(s): cb725da

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +1 -7
app.js CHANGED
@@ -1,10 +1,9 @@
1
  const express = require('express');
2
  const fetch = require('node-fetch');
3
  const zlib = require('zlib');
4
- const stream = require('stream');
5
  const { promisify } = require('util');
6
 
7
- const pipeline = promisify(stream.pipeline);
8
 
9
  const PROJECT_ID = process.env.PROJECT_ID;
10
  const CLIENT_ID = process.env.CLIENT_ID;
@@ -84,9 +83,6 @@ function formatModelName(model) {
84
  return model;
85
  }
86
 
87
- const { promisify } = require('util');
88
- const gunzip = promisify(zlib.gunzip);
89
-
90
  async function handleRequest(req, res) {
91
  if (req.method === 'OPTIONS') {
92
  handleOptions(res);
@@ -187,8 +183,6 @@ async function handleRequest(req, res) {
187
  }
188
  }
189
 
190
-
191
-
192
  function handleOptions(res) {
193
  res.status(204);
194
  res.setHeader('Access-Control-Allow-Origin', '*');
 
1
  const express = require('express');
2
  const fetch = require('node-fetch');
3
  const zlib = require('zlib');
 
4
  const { promisify } = require('util');
5
 
6
+ const gunzip = promisify(zlib.gunzip);
7
 
8
  const PROJECT_ID = process.env.PROJECT_ID;
9
  const CLIENT_ID = process.env.CLIENT_ID;
 
83
  return model;
84
  }
85
 
 
 
 
86
  async function handleRequest(req, res) {
87
  if (req.method === 'OPTIONS') {
88
  handleOptions(res);
 
183
  }
184
  }
185
 
 
 
186
  function handleOptions(res) {
187
  res.status(204);
188
  res.setHeader('Access-Control-Allow-Origin', '*');