feat(03-02): add domaincheck backend - DNS service, API endpoint, module seed
- CheckDomainDto with regex validation (T-03-05) and max 10 TLDs (T-03-06) - DomaincheckService using node:dns/promises with 5s timeout per lookup - POST /modules/domaincheck/check protected by UseModule guard (T-03-08) - DomaincheckModule seeds itself into registry on startup via OnModuleInit - Default TLDs: de, com, net, org (D-03)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { ModuleRegistryService } from '../module-registry/module-registry.service';
|
||||
|
||||
/**
|
||||
* Seeds the domaincheck module into the module registry.
|
||||
*
|
||||
* Called during DomaincheckModule initialization to ensure the
|
||||
* "domaincheck" module record exists in the database.
|
||||
*
|
||||
* Per D-09: category is 'domain-tools'.
|
||||
*/
|
||||
export async function seedDomaincheckModule(
|
||||
moduleRegistryService: ModuleRegistryService,
|
||||
): Promise<void> {
|
||||
await moduleRegistryService.seedModule({
|
||||
slug: 'domaincheck',
|
||||
name: 'Domaincheck',
|
||||
version: '1.0.0',
|
||||
category: 'domain-tools',
|
||||
description: {
|
||||
de: 'Domain-Verfuegbarkeit pruefen',
|
||||
en: 'Check domain availability',
|
||||
},
|
||||
isSystem: true,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user