diff options
author | 2024-02-10 18:37:40 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | e1c47572a6235fd8fd20af888ac3a11c7ae1369d (patch) | |
tree | 2dccff36a441916d7014037cef3f7ce84a790cad /start/events.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.gz ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.zst ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.zip |
updates
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 | }); |