9 lines
311 B
TypeScript
9 lines
311 B
TypeScript
/**
|
|
* Returns true if the given email matches the configured admin email.
|
|
* The admin email is set via ADMIN_EMAIL environment variable.
|
|
*/
|
|
export function isAdminEmail(email: string | undefined): boolean {
|
|
if (!email) return false
|
|
return email.toLowerCase() === process.env.ADMIN_EMAIL?.toLowerCase()
|
|
}
|