Add temporary getPhotos logging

This commit is contained in:
Sam Becker 2024-05-20 17:22:23 -05:00
parent 88cf0e9a5e
commit 2985b12a6c

View File

@ -312,9 +312,22 @@ export const getPhotos = async (options: GetPhotosOptions = {}) =>
sql.push(limitAndOffset);
values.push(...limitAndOffsetValues);
return query(sql.join(' '), values)
.then(({ rows }) => rows.map(parsePhotoFromDb));
}, 'getPhotos');
console.log('getPhotos 01', {
sql: sql.join(' '),
values,
});
return query(sql.join(' '), values);
}, 'getPhotos')
.then(response => {
console.log('getPhotos 02', response);
console.log('getPhotos 03', response.rows);
return response.rows.map(parsePhotoFromDb);
})
.catch(e => {
console.log('getPhotos 04', e);
return [];
});
export const getPhotosNearId = async (
photoId: string,