diff --git a/backend/src/core/config/environment.ts b/backend/src/core/config/environment.ts index 6c6c5b2..ab46b8d 100644 --- a/backend/src/core/config/environment.ts +++ b/backend/src/core/config/environment.ts @@ -3,7 +3,7 @@ * @ai-context Validates all env vars at startup, single source of truth */ import { z } from 'zod'; -import dotenv from 'dotenv'; +import * as dotenv from 'dotenv'; dotenv.config(); diff --git a/backend/src/core/logging/logger.ts b/backend/src/core/logging/logger.ts index 02e4790..fded0cc 100644 --- a/backend/src/core/logging/logger.ts +++ b/backend/src/core/logging/logger.ts @@ -2,7 +2,7 @@ * @ai-summary Structured logging with Winston * @ai-context All features use this for consistent logging */ -import winston from 'winston'; +import * as winston from 'winston'; import { env, isDevelopment } from '../config/environment'; export const logger = winston.createLogger({ diff --git a/backend/src/features/fuel-logs/domain/fuel-logs.service.ts b/backend/src/features/fuel-logs/domain/fuel-logs.service.ts index 261fc1a..d20c7e7 100644 --- a/backend/src/features/fuel-logs/domain/fuel-logs.service.ts +++ b/backend/src/features/fuel-logs/domain/fuel-logs.service.ts @@ -87,7 +87,7 @@ export class FuelLogsService { // Get from database 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 await cacheService.set(cacheKey, response, this.cacheTTL); @@ -106,7 +106,7 @@ export class FuelLogsService { // Get from database 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 await cacheService.set(cacheKey, response, this.cacheTTL); diff --git a/backend/src/features/stations/domain/stations.service.ts b/backend/src/features/stations/domain/stations.service.ts index d0fb1a0..2eea95f 100644 --- a/backend/src/features/stations/domain/stations.service.ts +++ b/backend/src/features/stations/domain/stations.service.ts @@ -4,7 +4,7 @@ import { StationsRepository } from '../data/stations.repository'; 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'; export class StationsService { @@ -68,7 +68,7 @@ export class StationsService { // Enrich with cached station data const enriched = await Promise.all( - savedStations.map(async (saved) => { + savedStations.map(async (saved: SavedStation) => { const station = await this.repository.getCachedStation(saved.stationId); return { ...saved, diff --git a/backend/src/features/vehicles/domain/vehicles.service.ts b/backend/src/features/vehicles/domain/vehicles.service.ts index 05e5529..9db60dc 100644 --- a/backend/src/features/vehicles/domain/vehicles.service.ts +++ b/backend/src/features/vehicles/domain/vehicles.service.ts @@ -70,7 +70,7 @@ export class VehiclesService { // Get from database 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 await cacheService.set(cacheKey, response, this.listCacheTTL);