Files
tessera-ctl/apps/api/src/domaincheck/domaincheck.controller.ts
T
schalli 9f78580606
Tessera CI/CD / Lint & Type Check (push) Successful in 1m8s
Tessera CI/CD / Tests (push) Successful in 1m13s
Tessera CI/CD / Build & Deploy (push) Successful in 2m39s
feat(domaincheck): support all TLDs with suggestion alternatives
- 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>
2026-06-25 14:54:30 +02:00

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,
};
}
}