fix (#2): add async keyword
This commit is contained in:
parent
310ec06ec7
commit
1af5c0702a
@ -1,7 +1,7 @@
|
|||||||
// Jokes provided from the lovely folks at https://icanhazdadjoke.com
|
// Jokes provided from the lovely folks at https://icanhazdadjoke.com
|
||||||
import jokes from './jokes.json'
|
import jokes from './jokes.json'
|
||||||
|
|
||||||
export const handler = (event) => {
|
export const handler = async () => {
|
||||||
// Generates a random index based on the length of the jokes array
|
// Generates a random index based on the length of the jokes array
|
||||||
const randomIndex = Math.floor(Math.random() * jokes.length)
|
const randomIndex = Math.floor(Math.random() * jokes.length)
|
||||||
const randomJoke = jokes[randomIndex]
|
const randomJoke = jokes[randomIndex]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user