Umstellung auf nodeclassic
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user