mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix: issues in authentication mail messages.
This commit is contained in:
@@ -3,7 +3,6 @@ import { pick } from 'lodash';
|
||||
import { EventSubscriber, On } from 'event-dispatch';
|
||||
import events from '@/subscribers/events';
|
||||
|
||||
|
||||
@EventSubscriber()
|
||||
export class AuthenticationSubscriber {
|
||||
|
||||
@@ -14,13 +13,14 @@ export class AuthenticationSubscriber {
|
||||
|
||||
@On(events.auth.register)
|
||||
public onRegister(payload) {
|
||||
const { registerDTO } = payload;
|
||||
const { registerDTO, user } = payload;
|
||||
|
||||
const agenda = Container.get('agenda');
|
||||
|
||||
// Send welcome mail to the user.
|
||||
agenda.now('welcome-email', {
|
||||
...pick(registerDTO, ['email', 'organizationName', 'firstName']),
|
||||
...pick(registerDTO, ['organizationName']),
|
||||
user,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ export class AuthenticationSubscriber {
|
||||
@On(events.auth.sendResetPassword)
|
||||
public onSendResetPassword (payload) {
|
||||
const { user, token } = payload;
|
||||
|
||||
const agenda = Container.get('agenda');
|
||||
|
||||
// Send reset password mail.
|
||||
|
||||
Reference in New Issue
Block a user