async function deleteVacations()

in event-driven-developers-tale/src/pages/Vacations.js [76:95]


    async function deleteVacations() {
        let input

        const fullList = pendingApprovalSelected.concat(comingUpSelected)

        // DELETE FROM LIST OF PENDING APPROVAL
        fullList.forEach(async (id) => {
            input = {
                id: id
            }

            console.log("Deleting vacation: " + id)

            await API.graphql({ query: deleteVacationRequest, variables: { "input": input }, authMode: 'AMAZON_COGNITO_USER_POOLS' })
        })

        setPendingApprovalSelected([])
        setComingUpSelected([])
        await getVacations()
    }