diff options
Diffstat (limited to 'start/events.ts')
-rw-r--r-- | start/events.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/start/events.ts b/start/events.ts index faedc29..9fe05e3 100644 --- a/start/events.ts +++ b/start/events.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Config } from '@adonisjs/core/config' | 1 | import { Config } from '@adonisjs/core/config'; |
2 | import emitter from '@adonisjs/core/services/emitter' | 2 | import emitter from '@adonisjs/core/services/emitter'; |
3 | import mail from '@adonisjs/mail/services/main' | 3 | import mail from '@adonisjs/mail/services/main'; |
4 | 4 | ||
5 | /* | 5 | /* |
6 | |-------------------------------------------------------------------------- | 6 | |-------------------------------------------------------------------------- |
@@ -14,8 +14,8 @@ import mail from '@adonisjs/mail/services/main' | |||
14 | emitter.on('forgot::password', async ({ user, token }) => { | 14 | emitter.on('forgot::password', async ({ user, token }) => { |
15 | try { | 15 | try { |
16 | // eslint-disable-next-line no-console | 16 | // eslint-disable-next-line no-console |
17 | console.log('Sending message') | 17 | console.log('Sending message'); |
18 | await mail.send((message) => { | 18 | await mail.send(message => { |
19 | message | 19 | message |
20 | .subject('[Ferdium] Forgot Password') | 20 | .subject('[Ferdium] Forgot Password') |
21 | .to(user.email) | 21 | .to(user.email) |
@@ -24,10 +24,10 @@ emitter.on('forgot::password', async ({ user, token }) => { | |||
24 | appUrl: Config.get('app.url'), | 24 | appUrl: Config.get('app.url'), |
25 | username: user.username, | 25 | username: user.username, |
26 | token, | 26 | token, |
27 | }) | 27 | }); |
28 | }) | 28 | }); |
29 | } catch (error) { | 29 | } catch (error) { |
30 | // eslint-disable-next-line no-console | 30 | // eslint-disable-next-line no-console |
31 | console.log(`Couldn't send mail: ${error}`) | 31 | console.log(`Couldn't send mail: ${error}`); |
32 | } | 32 | } |
33 | }) | 33 | }); |