UNPKG

skailan-contacts

Version:

Servicio de gestión de contactos para Skailan

17 lines 678 B
export class RemoveTagFromContact { contactTagRepository; contactRepository; constructor(contactTagRepository, contactRepository) { this.contactTagRepository = contactTagRepository; this.contactRepository = contactRepository; } async execute(request) { const { organizationId, contactId, tagId } = request; const contact = await this.contactRepository.findById(contactId, organizationId); if (!contact) { throw new Error('Contact not found.'); } await this.contactTagRepository.removeTagFromContact(contactId, tagId, organizationId); } } //# sourceMappingURL=RemoveTagFromContact.js.map