import { Injectable } from '@angular/core' ; import { Client } from '../../../services/api/client' ; import { EmailConfirmationComponent } from './email-confirmation.component' ; import { FormToastService } from '../../services/form-toast.service' ; see EmailConfirmationComponent @ Injectable ( { providedIn : 'root' } ) export class EmailConfirmationService { constructor ( protected client , private toasterService ) { } show ( ) { this . toasterService . error ( 'You must confirm your email address.' ) ; } /**
     * Attempts to re-send the confirmation email to the current logged in user
     */ async send ( ) { const response = ( await this . client . post ( 'api/v2/email/confirmation/resend' , { } ) ) as any ; return Boolean ( response && response . sent ) ; } }