diff --git a/backend/src/graphql/resolvers/ContactFormResolver.ts b/backend/src/graphql/resolvers/ContactFormResolver.ts index d9d3b4bc18..6fcdd3d6db 100644 --- a/backend/src/graphql/resolvers/ContactFormResolver.ts +++ b/backend/src/graphql/resolvers/ContactFormResolver.ts @@ -7,9 +7,11 @@ import { EVENT_CONTACTFORM_SEND } from '#src/event/Events' @Resolver() export class ContactFormResolver { @Mutation(() => Boolean) - createContactForm(@Arg('contactFormData') contactFormData: ContactFormInput): boolean { + async createContactForm( + @Arg('contactFormData') contactFormData: ContactFormInput, + ): Promise { void sendContactEmails(contactFormData) - void EVENT_CONTACTFORM_SEND(contactFormData.email) + await EVENT_CONTACTFORM_SEND(contactFormData.email) return true } } diff --git a/backend/src/graphql/resolvers/NewsletterSubscriptionResolver.ts b/backend/src/graphql/resolvers/NewsletterSubscriptionResolver.ts index a073d69deb..7ad2a13c2e 100644 --- a/backend/src/graphql/resolvers/NewsletterSubscriptionResolver.ts +++ b/backend/src/graphql/resolvers/NewsletterSubscriptionResolver.ts @@ -15,14 +15,14 @@ export class NewsletterSubscriptionResolver { subscribeToNewsletterData.lastName, subscribeToNewsletterData.email, ) - void EVENT_NEWSLETTER_SUBSCRIBE(subscribeToNewsletterData.email) + await EVENT_NEWSLETTER_SUBSCRIBE(subscribeToNewsletterData.email) return result } @Mutation(() => Boolean) async confirmNewsletter(@Arg('code') code: string): Promise { const result = await confirmNewsletter(code) - void EVENT_NEWSLETTER_CONFIRM(result ? result.email : undefined) + await EVENT_NEWSLETTER_CONFIRM(result ? result.email : undefined) return !!result } }