Skip to content

Commit 206145e

Browse files
authored
Correctly reference event (#234)
* Update swapi.mjs * Update index.mjs
1 parent f0bccb7 commit 206145e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

handler/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 301 permanently redirect /index requests to /graphql
33
*/
44
export const handler = async function(event) {
5-
if (req.httpMethod === 'OPTIONS') {
5+
if (event.httpMethod === 'OPTIONS') {
66
return { statusCode: 200 };
77
}
88
let location = '/graphql';

handler/swapi.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 301 permanently redirect /swapi requests to /graphql
33
*/
44
export const handler = async function(event) {
5-
if (req.httpMethod === 'OPTIONS') {
5+
if (event.httpMethod === 'OPTIONS') {
66
return { statusCode: 200 };
77
}
88
let location = '/graphql';

0 commit comments

Comments
 (0)