feat: add dcrouter external gateway sync
This commit is contained in:
@@ -454,7 +454,7 @@ export class OneboxDatabase {
|
||||
return this.certificateRepo.getAllDomains();
|
||||
}
|
||||
|
||||
getDomainsByProvider(provider: 'cloudflare' | 'manual'): IDomain[] {
|
||||
getDomainsByProvider(provider: NonNullable<IDomain['dnsProvider']>): IDomain[] {
|
||||
return this.certificateRepo.getDomainsByProvider(provider);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ export class CertificateRepository extends BaseRepository {
|
||||
return rows.map((row) => this.rowToDomain(row));
|
||||
}
|
||||
|
||||
getDomainsByProvider(provider: 'cloudflare' | 'manual'): IDomain[] {
|
||||
getDomainsByProvider(provider: NonNullable<IDomain['dnsProvider']>): IDomain[] {
|
||||
const rows = this.query('SELECT * FROM domains WHERE dns_provider = ? ORDER BY domain ASC', [provider]);
|
||||
return rows.map((row) => this.rowToDomain(row));
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ const encryptedSecretPrefix = 'enc:v1:';
|
||||
const secretSettingAliases = {
|
||||
backupPassword: ['backup_encryption_password'],
|
||||
cloudflareToken: ['cloudflareAPIKey'],
|
||||
dcrouterGatewayApiToken: ['externalGatewayApiToken'],
|
||||
} as const;
|
||||
|
||||
type TCanonicalSecretSettingKey = keyof typeof secretSettingAliases;
|
||||
|
||||
Reference in New Issue
Block a user