mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: i18n middleware
feat: i18n configuration. feat: i18n with tenancy.
This commit is contained in:
@@ -20,18 +20,19 @@ export default class WelcomeEmailJob {
|
||||
* @param {Function} done
|
||||
*/
|
||||
public async handler(job, done: Function): Promise<void> {
|
||||
const { user, token } = job.attrs.data;
|
||||
const { data } = job.attrs;
|
||||
const { user, token } = data;
|
||||
const Logger = Container.get('logger');
|
||||
const authService = Container.get(AuthenticationService);
|
||||
|
||||
Logger.info(`[send_reset_password] started: ${job.attrs.data}`);
|
||||
Logger.info(`[send_reset_password] started.`, { data });
|
||||
|
||||
try {
|
||||
await authService.mailMessages.sendResetPasswordMessage(user, token);
|
||||
Logger.info(`[send_reset_password] finished: ${job.attrs.data}`);
|
||||
Logger.info(`[send_reset_password] finished.`, { data });
|
||||
done()
|
||||
} catch (error) {
|
||||
Logger.info(`[send_reset_password] error: ${job.attrs.data}, error: ${error}`);
|
||||
Logger.error(`[send_reset_password] error.`, { data, error });
|
||||
done(error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user