mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
16 lines
449 B
TypeScript
16 lines
449 B
TypeScript
import { Container } from 'typedi';
|
|
import { On, EventSubscriber } from "event-dispatch";
|
|
import events from 'subscribers/events';
|
|
|
|
@EventSubscriber()
|
|
export class OrganizationSubscriber {
|
|
/**
|
|
* Sends welcome SMS once the organization build completed.
|
|
*/
|
|
@On(events.organization.build)
|
|
public async onBuild({ tenant, user }) {
|
|
const agenda = Container.get('agenda');
|
|
|
|
await agenda.now('welcome-sms', { tenant, user });
|
|
}
|
|
} |