feat(#65): Replace existing console logs

This commit is contained in:
Josh Creek
2024-10-30 21:06:12 +00:00
parent 2ef478e4b1
commit 3d89222eec
7 changed files with 35 additions and 25 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { json } from '@sveltejs/kit';
import { getActiveProductsWithPrices } from '$lib/utils/supabase/admin';
import logger from '$lib/utils/logger/logger';
export const GET = async ({ url }) => {
try {
@@ -13,7 +14,7 @@ export const GET = async ({ url }) => {
return json({ products, count });
} catch (error) {
console.error(error);
logger.error(error);
return json({ error: error.message }, { status: 500 });
}
};