enable teams for self-hosted (#137)
* enable teams for self-hosted * remove console
This commit is contained in:
@@ -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}`);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user