Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
rickstaa committed Oct 4, 2022
1 parent 677096c commit f597b02
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export default async (req, res) => {
CONSTANTS.ONE_DAY,
);

res.setHeader("Cache-Control", `max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`);
res.setHeader(
"Cache-Control",
`max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`,
);

return res.send(
renderStatsCard(stats, {
Expand Down
5 changes: 4 additions & 1 deletion api/pin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export default async (req, res) => {
cacheSeconds = CONSTANTS.FOUR_HOURS;
}

res.setHeader("Cache-Control", `max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`);
res.setHeader(
"Cache-Control",
`max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`,
);

return res.send(
renderRepoCard(repoData, {
Expand Down
5 changes: 4 additions & 1 deletion api/top-langs.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export default async (req, res) => {
CONSTANTS.ONE_DAY,
);

res.setHeader("Cache-Control", `max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`);
res.setHeader(
"Cache-Control",
`max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`,
);

return res.send(
renderTopLanguages(topLangs, {
Expand Down
5 changes: 4 additions & 1 deletion api/wakatime.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export default async (req, res) => {
cacheSeconds = CONSTANTS.FOUR_HOURS;
}

res.setHeader("Cache-Control", `max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`);
res.setHeader(
"Cache-Control",
`max-age=${cacheSeconds}, s-maxage=${cacheSeconds} stale-while-revalidate`,
);

return res.send(
renderWakatimeCard(stats, {
Expand Down
2 changes: 1 addition & 1 deletion src/fetchers/stats-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ const totalStarsFetcher = async (username, repoToHide) => {
// hasNextPage =
// allNodes.length === nodesWithStars.length &&
// res.data.data.user.repositories.pageInfo.hasNextPage;
hasNextPage = false // NOTE: Temporarily disable fetching of multiple pages.
hasNextPage = false; // NOTE: Temporarily disable fetching of multiple pages.
endCursor = res.data.data.user.repositories.pageInfo.endCursor;
}

Expand Down

0 comments on commit f597b02

Please sign in to comment.