feat: Implement Novu package migration

This commit is contained in:
gpt-engineer-app[bot]
2025-10-12 15:40:37 +00:00
parent e3331dae96
commit 4d96f45e74
9 changed files with 27 additions and 567 deletions

View File

@@ -1,5 +1,5 @@
import { serve } from "https://deno.land/std@0.168.0/http/server.ts";
import { Novu } from "npm:@novu/node@2.0.2";
import { Novu } from "@novu/api";
// TODO: In production, restrict CORS to specific domains
// For now, allowing all origins for development flexibility
@@ -21,8 +21,9 @@ serve(async (req) => {
throw new Error('NOVU_API_KEY is not configured');
}
const novu = new Novu(novuApiKey, {
backendUrl: Deno.env.get('VITE_NOVU_API_URL') || 'https://api.novu.co',
const novu = new Novu({
apiKey: novuApiKey,
baseURL: Deno.env.get('VITE_NOVU_API_URL') || 'https://api.novu.co',
});
// Parse and validate request body