Enhance admin interface, security, and feed management with improved UX and authentication

This commit is contained in:
Young Lee
2025-02-27 18:04:01 -08:00
parent 8839aac24b
commit 56a8263f33
19 changed files with 2022 additions and 523 deletions
+3 -2
View File
@@ -6,11 +6,12 @@ import { EmailData } from '../types';
export class EmailParser {
/**
* Extract the feed ID from an email address
* @param emailAddress The email address (e.g., newsletter-xyz@domain.com)
* @param emailAddress The email address (e.g., apple.mountain.42@domain.com)
* @returns The feed ID or null if not found
*/
static extractFeedId(emailAddress: string): string | null {
const match = emailAddress.match(/^newsletter-([a-zA-Z0-9]+)@/);
// Match pattern for noun1.noun2.XY before the @ symbol
const match = emailAddress.match(/^([a-z]+\.[a-z]+\.\d{2})@/i);
return match ? match[1] : null;
}