reformat with prettier with semicolons and tabs
This commit is contained in:
@ -4,17 +4,17 @@
|
||||
* and then export it. That way you can import here and anywhere else
|
||||
* and use it straight away.
|
||||
*/
|
||||
import previewEmail from "preview-email"
|
||||
import previewEmail from "preview-email";
|
||||
|
||||
type ResetPasswordMailer = {
|
||||
to: string
|
||||
token: string
|
||||
}
|
||||
to: string;
|
||||
token: string;
|
||||
};
|
||||
|
||||
export function forgotPasswordMailer({ to, token }: ResetPasswordMailer) {
|
||||
// In production, set APP_ORIGIN to your production server origin
|
||||
const origin = process.env.APP_ORIGIN || process.env.BLITZ_DEV_SERVER_ORIGIN
|
||||
const resetUrl = `${origin}/reset-password?token=${token}`
|
||||
const origin = process.env.APP_ORIGIN || process.env.BLITZ_DEV_SERVER_ORIGIN;
|
||||
const resetUrl = `${origin}/reset-password?token=${token}`;
|
||||
|
||||
const msg = {
|
||||
from: "TODO@example.com",
|
||||
@ -28,7 +28,7 @@ export function forgotPasswordMailer({ to, token }: ResetPasswordMailer) {
|
||||
Click here to set a new password
|
||||
</a>
|
||||
`,
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
async send() {
|
||||
@ -37,11 +37,11 @@ export function forgotPasswordMailer({ to, token }: ResetPasswordMailer) {
|
||||
// await postmark.sendEmail(msg)
|
||||
throw new Error(
|
||||
"No production email implementation in mailers/forgotPasswordMailer"
|
||||
)
|
||||
);
|
||||
} else {
|
||||
// Preview email in the browser
|
||||
await previewEmail(msg)
|
||||
await previewEmail(msg);
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user