Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ IDP_END_SESSION_ENDPOINT=http://${DEV_DOMAIN:-localhost}:${IDP_PORT}/session/end

# site
SITE_PORT=3000
SITE_URL=http://${DEV_DOMAIN:-localhost}:$SITE_PORT
API_BASIC_AUTH_SYSTEM_USER_PASSWORD=$BASIC_AUTH_SYSTEM_USER_PASSWORD
SITE_PREVIEW_SECRET=zPoURKLHPcMnV7E9

Expand Down Expand Up @@ -122,7 +121,6 @@ OAUTH2_PROXY_SKIP_AUTH_PREFLIGHT=true
# brevo
BREVO_API_KEY= # set in .env.local
BREVO_ECG_RTR_LIST_API_KEY= # set in .env.local
BREVO_REDIRECT_URL_FOR_IMPORT=$SITE_URL
BREVO_CAMPAIGN_BASIC_AUTH_USERNAME=
BREVO_CAMPAIGN_BASIC_AUTH_PASSWORD=
BREVO_EMAIL_HASH_KEY=JJgGFeXBBAfd4pT8vn4ZtKeXE2EpsmwhoH9hfxhToBBvi2bVtR2gfBbWH2UVa8aa
Expand Down
19 changes: 7 additions & 12 deletions demo/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,14 @@ export class AppModule {
resolveConfig: (scope: EmailCampaignContentScope) => {
// change config based on scope - for example different sender email
// this is just to show you can use the scope to change the config but it has no real use in this example
if (scope.domain === "main") {
return {
apiKey: config.brevo.apiKey,
redirectUrlForImport: config.brevo.redirectUrlForImport,
};
} else if (scope.domain === "secondary") {
return {
apiKey: config.brevo.apiKey,
redirectUrlForImport: config.brevo.redirectUrlForImport,
};
const siteConfig = config.siteConfigs.find((siteConfig) => siteConfig.scope.domain == scope.domain);
if (!siteConfig) {
throw Error("Invalid scope passed");
}

throw Error("Invalid scope passed");
return {
apiKey: config.brevo.apiKey,
redirectUrlForImport: siteConfig.url,
};
},
BlacklistedContacts,
BrevoContactAttributes,
Expand Down
1 change: 0 additions & 1 deletion demo/api/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export function createConfig(processEnv: NodeJS.ProcessEnv) {
siteConfigs: envVars.PRIVATE_SITE_CONFIGS,
brevo: {
apiKey: envVars.BREVO_API_KEY,
redirectUrlForImport: envVars.BREVO_REDIRECT_URL_FOR_IMPORT,
campaign: {
basicAuth: {
username: envVars.BREVO_CAMPAIGN_BASIC_AUTH_USERNAME,
Expand Down
3 changes: 0 additions & 3 deletions demo/api/src/config/environment-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ export class EnvironmentVariables {
@IsString()
BREVO_API_KEY: string;

@IsString()
BREVO_REDIRECT_URL_FOR_IMPORT: string;

@IsString()
BREVO_ECG_RTR_LIST_API_KEY: string;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"browser:demo": "run-p browser:demo:api browser:demo:admin browser:demo:site browser:demo:jaeger",
"browser:demo:api": "dotenv -- sh -c 'open-cli $API_URL/graphql'",
"browser:demo:admin": "dotenv -- sh -c 'open-cli $ADMIN_URL'",
"browser:demo:site": "dotenv -- sh -c 'open-cli $SITE_URL'",
"browser:demo:site": "dotenv -- sh -c 'open-cli http://localhost:$SITE_PORT'",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to not keep SITE_URL just for this script

"browser:demo:jaeger": "dotenv -- sh -c 'open-cli http://localhost:$JAEGER_UI_PORT'",
"install-agent-skills": "pnpm exec comet install-agent-skills --config agent-skills.json",
"setup:ci": "pnpm run copy-project-files",
Expand Down
Loading