0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-31 22:51:25 -05:00

feat(aliyun-dm): test message template (#183)

* feat(aliyun-dm): test message template

* fix: remove test template
This commit is contained in:
Wang Sijie 2022-01-20 15:34:46 +08:00 committed by GitHub
parent 764de712d7
commit 81aaa4a083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -73,7 +73,10 @@ export const sendMessage: EmailSendMessageFunction = async (address, type, data)
ToAddress: address,
FromAlias: config.fromAlias,
Subject: template.subject,
HtmlBody: template.content.replaceAll('{{code}}', data.code),
HtmlBody:
typeof data.code === 'string'
? template.content.replaceAll('{{code}}', data.code)
: template.content,
},
config.accessKeySecret
);

View file

@ -25,6 +25,7 @@ export interface EmailMessageTypes {
ForgotPassword: {
code: string;
};
Test: Record<string, unknown>;
}
export type EmailSendMessageFunction<T = unknown> = (