async function addCategory()

in event-driven-developers-tale/src/components/AddCategory.js [9:23]


    async function addCategory() {
        const newCategory = {
            name: name
        }

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

        emmiter.emit("showModal", false, "", "", null)
    }