File tree 1 file changed +1
-23
lines changed
1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const { default: axios } = require("axios")
2
2
3
3
exports . handler = async function ( event , callback ) {
4
4
5
- const NYT_APP_API_KEY = process . env . REACT_APP_NYT_APP_API_KEY
5
+ const NYT_APP_API_KEY = process . env . REACT_APP_NYT_APP_API_KEY
6
6
const BASE_URL = process . env . REACT_APP_BASE_URL_API_NYT
7
7
8
8
const API_URL = `${ BASE_URL } /lists/overview.json?api-key=${ NYT_APP_API_KEY } `
@@ -19,26 +19,4 @@ exports.handler = async function(event, callback) {
19
19
body : JSON . stringify ( error )
20
20
}
21
21
}
22
-
23
- // const pass = (body) => {callback(null, {statusCode: 200, body: JSON.stringify(body)})}
24
-
25
- // const NYT_APP_API_KEY = process.env.REACT_APP_NYT_APP_API_KEY
26
- // const BASE_URL = process.env.REACT_APP_BASE_URL_API_NYT
27
-
28
- // const API_URL = `${BASE_URL}/lists/overview.json?api-key=${NYT_APP_API_KEY}`
29
- // try {
30
- // let response = await fetch(API_URL,
31
- // {
32
- // method: event.httpMethod,
33
- // body: event.body
34
- // })
35
- // let data = await response.json()
36
- // await pass(data)
37
- // } catch(err) {
38
- // let error = {
39
- // statusCode: err.statusCode || 500,
40
- // body: JSON.stringify({error: err.message})
41
- // }
42
- // await pass(error)
43
- // }
44
22
}
You can’t perform that action at this time.
0 commit comments