mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
Remove console logs.
This commit is contained in:
parent
decae89479
commit
5701a40d3a
4 changed files with 7 additions and 7 deletions
|
|
@ -27,7 +27,7 @@ export async function fetchBandcampAlbums() {
|
||||||
});
|
});
|
||||||
|
|
||||||
const albums: Album[] = data?.collectionItems || [];
|
const albums: Album[] = data?.collectionItems || [];
|
||||||
console.log(`Albums ${JSON.stringify(albums)}`);
|
// console.log(`Albums ${JSON.stringify(albums)}`);
|
||||||
|
|
||||||
if (albums && albums?.length > 0) {
|
if (albums && albums?.length > 0) {
|
||||||
return albums;
|
return albums;
|
||||||
|
|
@ -35,6 +35,6 @@ export async function fetchBandcampAlbums() {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
let totalArticles: number;
|
let totalArticles: number;
|
||||||
$: ({ albums, articlesData } = data);
|
$: ({ albums, articlesData } = data);
|
||||||
$: ({ articles, totalArticles } = articlesData);
|
$: ({ articles, totalArticles } = articlesData);
|
||||||
$: console.log(`All data: ${JSON.stringify(articlesData)}`);
|
// $: console.log(`All data: ${JSON.stringify(articlesData)}`);
|
||||||
|
|
||||||
const userNames = {
|
const userNames = {
|
||||||
github: 'BradNut',
|
github: 'BradNut',
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,14 @@ export async function fetchArticlesApi(
|
||||||
since: `${pageQuery.since}`,
|
since: `${pageQuery.since}`,
|
||||||
page: `${pageQuery.page}`
|
page: `${pageQuery.page}`
|
||||||
});
|
});
|
||||||
console.log(`Entries params: ${entriesQueryParams}`);
|
// console.log(`Entries params: ${entriesQueryParams}`);
|
||||||
|
|
||||||
if (USE_REDIS_CACHE) {
|
if (USE_REDIS_CACHE) {
|
||||||
const cached = await redis.get(entriesQueryParams.toString());
|
const cached = await redis.get(entriesQueryParams.toString());
|
||||||
|
|
||||||
if (cached) {
|
if (cached) {
|
||||||
const response = JSON.parse(cached);
|
const response = JSON.parse(cached);
|
||||||
console.log('Cache hit!');
|
// console.log('Cache hit!');
|
||||||
const ttl = await redis.ttl(entriesQueryParams.toString());
|
const ttl = await redis.ttl(entriesQueryParams.toString());
|
||||||
|
|
||||||
return { ...response, cacheControl: `max-age=${ttl}` };
|
return { ...response, cacheControl: `max-age=${ttl}` };
|
||||||
|
|
@ -86,7 +86,7 @@ export async function fetchArticlesApi(
|
||||||
|
|
||||||
// do {
|
// do {
|
||||||
// nbEntries += entries._embedded.items.length;
|
// nbEntries += entries._embedded.items.length;
|
||||||
console.log(`number of articles fetched: ${_embedded.items.length}`);
|
// console.log(`number of articles fetched: ${_embedded.items.length}`);
|
||||||
_embedded.items.forEach((article: WallabagArticle) => {
|
_embedded.items.forEach((article: WallabagArticle) => {
|
||||||
// if (articles?.length === +WALLABAG_MAX_ARTICLES) {
|
// if (articles?.length === +WALLABAG_MAX_ARTICLES) {
|
||||||
// console.log('Reached 30 articles');
|
// console.log('Reached 30 articles');
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ export const GET: RequestHandler = async ({ setHeaders, url }: RequestEvent) =>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`API response ${JSON.stringify(response)}`);
|
// console.log(`API response ${JSON.stringify(response)}`);
|
||||||
return json(response);
|
return json(response);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue