fix: only use cloud mailer client if creds exist
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
import Plunk from "@plunk/node";
|
import Plunk from "@plunk/node";
|
||||||
|
|
||||||
export const cloudMailerClient =
|
export const cloudMailerClient =
|
||||||
process.env.NEXT_PUBLIC_KAN_ENV === "cloud"
|
process.env.NEXT_PUBLIC_KAN_ENV === "cloud" &&
|
||||||
|
process.env.PLUNK_API_KEY &&
|
||||||
|
process.env.PLUNK_API_URL
|
||||||
? new Plunk(process.env.PLUNK_API_KEY ?? "", {
|
? new Plunk(process.env.PLUNK_API_KEY ?? "", {
|
||||||
baseUrl: process.env.PLUNK_API_URL,
|
baseUrl: process.env.PLUNK_API_URL,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user