replaced some console.errors with logger

This commit is contained in:
jackiettran
2026-01-10 20:47:29 -05:00
parent 86cb8b3fe0
commit 415bcc5021
15 changed files with 165 additions and 174 deletions

View File

@@ -1,5 +1,6 @@
const { sequelize } = require("../models");
const { QueryTypes } = require("sequelize");
const logger = require("../utils/logger");
class LocationService {
/**
@@ -71,7 +72,7 @@ class LocationService {
distance: parseFloat(user.distance).toFixed(2), // Round to 2 decimal places
}));
} catch (error) {
console.error("Error finding users in radius:", error);
logger.error("Error finding users in radius", { error });
throw new Error(`Failed to find users in radius: ${error.message}`);
}
}