0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-04-07 23:01:25 -05:00

fix(aliyun-dm): validate config before sending (#206)

This commit is contained in:
Wang Sijie 2022-01-29 14:55:42 +08:00 committed by GitHub
parent ddb9968c98
commit 2b55c85b5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,7 @@ export type AliyunDmConfig = z.infer<typeof configGuard>;
export const sendMessage: EmailSendMessageFunction = async (address, type, data) => {
const config = await getConnectorConfig<AliyunDmConfig>(metadata.id);
await validateConfig(config);
const template = config.templates.find((template) => template.type === type);
if (!template) {