Umstellung auf nodeclassic

This commit is contained in:
2024-09-04 14:56:24 +02:00
parent c5577969c8
commit d8429f9b4a
47 changed files with 330 additions and 508 deletions

View File

@@ -1,12 +1,11 @@
import { Injectable } from '@nestjs/common';
import { readFileSync } from 'fs';
import path, { join } from 'path';
import { CityAndStateResult, CountyResult, GeoResult } from 'src/models/main.model.js';
import { fileURLToPath } from 'url';
import { City, CountyData, Geo, State } from '../models/server.model.js';
import { join } from 'path';
import { CityAndStateResult, CountyResult, GeoResult } from 'src/models/main.model';
import { City, CountyData, Geo, State } from '../models/server.model';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// const __filename = fileURLToPath(import.meta.url);
// const __dirname = path.dirname(__filename);
@Injectable()
export class GeoService {
@@ -24,7 +23,7 @@ export class GeoService {
this.counties = JSON.parse(rawCountiesData);
}
findCountiesStartingWith(prefix: string, states?: string[]) {
let results: CountyResult[] = [];
const results: CountyResult[] = [];
let idCounter = 1;
this.counties.forEach(stateData => {