fixed imports. Maybe.

This commit is contained in:
Eric Gullickson
2025-08-23 11:28:01 -05:00
parent 8374f1ee66
commit 5f67a904e0
5 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
* @ai-context Validates all env vars at startup, single source of truth * @ai-context Validates all env vars at startup, single source of truth
*/ */
import { z } from 'zod'; import { z } from 'zod';
import dotenv from 'dotenv'; import * as dotenv from 'dotenv';
dotenv.config(); dotenv.config();

View File

@@ -2,7 +2,7 @@
* @ai-summary Structured logging with Winston * @ai-summary Structured logging with Winston
* @ai-context All features use this for consistent logging * @ai-context All features use this for consistent logging
*/ */
import winston from 'winston'; import * as winston from 'winston';
import { env, isDevelopment } from '../config/environment'; import { env, isDevelopment } from '../config/environment';
export const logger = winston.createLogger({ export const logger = winston.createLogger({

View File

@@ -87,7 +87,7 @@ export class FuelLogsService {
// Get from database // Get from database
const logs = await this.repository.findByVehicleId(vehicleId); const logs = await this.repository.findByVehicleId(vehicleId);
const response = logs.map(log => this.toResponse(log)); const response = logs.map((log: FuelLog) => this.toResponse(log));
// Cache result // Cache result
await cacheService.set(cacheKey, response, this.cacheTTL); await cacheService.set(cacheKey, response, this.cacheTTL);
@@ -106,7 +106,7 @@ export class FuelLogsService {
// Get from database // Get from database
const logs = await this.repository.findByUserId(userId); const logs = await this.repository.findByUserId(userId);
const response = logs.map(log => this.toResponse(log)); const response = logs.map((log: FuelLog) => this.toResponse(log));
// Cache result // Cache result
await cacheService.set(cacheKey, response, this.cacheTTL); await cacheService.set(cacheKey, response, this.cacheTTL);

View File

@@ -4,7 +4,7 @@
import { StationsRepository } from '../data/stations.repository'; import { StationsRepository } from '../data/stations.repository';
import { googleMapsClient } from '../external/google-maps/google-maps.client'; import { googleMapsClient } from '../external/google-maps/google-maps.client';
import { StationSearchRequest, StationSearchResponse } from './stations.types'; import { StationSearchRequest, StationSearchResponse, SavedStation } from './stations.types';
import { logger } from '../../../core/logging/logger'; import { logger } from '../../../core/logging/logger';
export class StationsService { export class StationsService {
@@ -68,7 +68,7 @@ export class StationsService {
// Enrich with cached station data // Enrich with cached station data
const enriched = await Promise.all( const enriched = await Promise.all(
savedStations.map(async (saved) => { savedStations.map(async (saved: SavedStation) => {
const station = await this.repository.getCachedStation(saved.stationId); const station = await this.repository.getCachedStation(saved.stationId);
return { return {
...saved, ...saved,

View File

@@ -70,7 +70,7 @@ export class VehiclesService {
// Get from database // Get from database
const vehicles = await this.repository.findByUserId(userId); const vehicles = await this.repository.findByUserId(userId);
const response = vehicles.map(v => this.toResponse(v)); const response = vehicles.map((v: Vehicle) => this.toResponse(v));
// Cache result // Cache result
await cacheService.set(cacheKey, response, this.listCacheTTL); await cacheService.set(cacheKey, response, this.listCacheTTL);