9f78580606
- Accept full domains (e.g. "example.xyz") not just labels - Check the entered TLD as primary result - Show .de, .com, .net, .org as alternative suggestions below - Primary result highlighted with accent border - Input without TLD still works (shows all 4 suggestions) - Updated i18n placeholders and added "suggestions" label Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
620 B
TypeScript
21 lines
620 B
TypeScript
import { Body, Controller, Post } from '@nestjs/common';
|
|
import { UseModule } from '../module-registry/module.guard';
|
|
import { CheckDomainDto } from './dto/check-domain.dto';
|
|
import { DomaincheckService } from './domaincheck.service';
|
|
|
|
@Controller('modules/domaincheck')
|
|
@UseModule('domaincheck')
|
|
export class DomaincheckController {
|
|
constructor(private readonly domaincheckService: DomaincheckService) {}
|
|
|
|
@Post('check')
|
|
async checkDomain(@Body() dto: CheckDomainDto) {
|
|
const results = await this.domaincheckService.checkDomain(dto.domain);
|
|
|
|
return {
|
|
domain: dto.domain,
|
|
results,
|
|
};
|
|
}
|
|
}
|