enable teams for self-hosted (#137)

* enable teams for self-hosted

* remove console
This commit is contained in:
KM Koushik
2025-03-29 00:56:06 +11:00
committed by GitHub
parent 1b6676c1b1
commit f1186f875c
12 changed files with 214 additions and 98 deletions

View File

@@ -165,6 +165,17 @@ export async function deleteDomain(id: number) {
});
}
export async function getDomains(teamId: number) {
return db.domain.findMany({
where: {
teamId,
},
orderBy: {
createdAt: "desc",
},
});
}
async function getDmarcRecord(domain: string) {
try {
const dmarcRecord = await dnsResolveTxt(`_dmarc.${domain}`);

View File

@@ -201,6 +201,8 @@ async function executeEmail(
? JSON.parse(email.attachments)
: [];
console.log(`Domain: ${JSON.stringify(domain)}`);
const configurationSetName = await getConfigurationSetName(
domain?.clickTracking ?? false,
domain?.openTracking ?? false,
@@ -208,7 +210,6 @@ async function executeEmail(
);
if (!configurationSetName) {
console.log(`[EmailQueueService]: Configuration set not found, skipping`);
return;
}

View File

@@ -27,6 +27,7 @@ export class SesSettingsService {
region = env.AWS_DEFAULT_REGION
): Promise<SesSetting | null> {
await this.checkInitialized();
if (this.cache[region]) {
return this.cache[region] as SesSetting;
}