BugFixes bzgl. Observables, Logging Anpassungen, Endpunkt hardening, dotenv-flow usage

This commit is contained in:
2024-09-20 13:49:50 +02:00
parent 205793faab
commit 3e84b82c92
25 changed files with 141 additions and 181 deletions

View File

@@ -35,7 +35,7 @@ export class GeoController {
return this.geoService.findCountiesStartingWith(countyRequest.prefix, countyRequest.states);
}
@Get('ipinfo/georesult/wysiwyg')
fetchIpAndGeoLocation(@RealIp() ipInfo: RealIpInfo): any {
return this.geoService.fetchIpAndGeoLocation(ipInfo);
async fetchIpAndGeoLocation(@RealIp() ipInfo: RealIpInfo): Promise<any> {
return await this.geoService.fetchIpAndGeoLocation(ipInfo);
}
}

View File

@@ -31,7 +31,7 @@ export class GeoService {
this.counties.forEach(stateData => {
if (!states || states.includes(stateData.state)) {
stateData.counties.forEach(county => {
if (county.startsWith(prefix.toUpperCase())) {
if (county.startsWith(prefix?.toUpperCase())) {
results.push({
id: idCounter++,
name: county,