fix (#2): add async keyword

This commit is contained in:
Ben Hong 2022-02-23 08:23:47 -08:00
parent 310ec06ec7
commit 1af5c0702a

View File

@ -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]