nuxt-generation-emails 0.1.31 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the sendGenEmails handler function from runtime config
|
|
3
|
-
* This allows users to provide a custom function for sending emails
|
|
4
|
-
* while keeping the logic decoupled from the API routes
|
|
5
|
-
*
|
|
6
|
-
* @returns The sendGenEmails function if provided, or null
|
|
7
|
-
*/
|
|
8
|
-
export declare function getSendGenEmailsHandler(): ((html: string, data: Record<string, unknown>) => Promise<void> | void) | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { useRuntimeConfig } from "#imports";
|
|
2
|
-
export function getSendGenEmailsHandler() {
|
|
3
|
-
const config = useRuntimeConfig();
|
|
4
|
-
if (config.nuxtGenEmails?.sendGenEmails && typeof config.nuxtGenEmails.sendGenEmails === "function") {
|
|
5
|
-
return config.nuxtGenEmails.sendGenEmails;
|
|
6
|
-
}
|
|
7
|
-
return null;
|
|
8
|
-
}
|