(email: string, category: string)
| 7 | 'default-secret-change-in-production'; |
| 8 | |
| 9 | export function generateUnsubscribeToken(email: string, category: string): string { |
| 10 | const data = `${email}:${category}`; |
| 11 | return createHmac('sha256', SECRET).update(data).digest('hex'); |
| 12 | } |
| 13 | |
| 14 | export function verifyUnsubscribeToken( |
| 15 | email: string, |
no outgoing calls
no test coverage detected