asdfafd
This commit is contained in:
@@ -931,9 +931,7 @@ router.put('/plans/:id/status', validateParams(idParamSchema), async (req, res,
|
||||
// @access Private
|
||||
router.get('/logs', async (req, res, next) => {
|
||||
try {
|
||||
console.log('=== FIRST LOGS ENDPOINT CALLED ===');
|
||||
const { property_id, start_date, end_date, limit = 50, planId } = req.query;
|
||||
console.log('Query params:', { property_id, start_date, end_date, limit, planId });
|
||||
|
||||
let whereConditions = ['al.user_id = $1'];
|
||||
let queryParams = [req.user.id];
|
||||
@@ -986,18 +984,6 @@ router.get('/logs', async (req, res, next) => {
|
||||
queryParams
|
||||
);
|
||||
|
||||
console.log(`Found ${result.rows.length} logs`);
|
||||
if (result.rows.length > 0) {
|
||||
console.log('First log gps_track:', result.rows[0].gps_track);
|
||||
console.log('First log raw data sample:', {
|
||||
id: result.rows[0].id,
|
||||
plan_id: result.rows[0].plan_id,
|
||||
gps_track: result.rows[0].gps_track,
|
||||
average_speed: result.rows[0].average_speed,
|
||||
area_covered: result.rows[0].area_covered,
|
||||
notes: result.rows[0].notes
|
||||
});
|
||||
}
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user