Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lvax committed Oct 10, 2024
1 parent 7fd3683 commit bb743ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { GitHubEvent } from '$lib/types/GithubEvent';

// Function to fetch GitHub contributions count (events)
export const fetchGitHubContributionsCount = async (username: string): Promise<number> => {
const url = `https://api.github.com/users/${username}/events`;
Expand All @@ -13,7 +11,7 @@ export const fetchGitHubContributionsCount = async (username: string): Promise<n
throw new Error(`Error fetching data: ${response.statusText}`);
}

const data: GitHubEvent[] = await response.json();
const data = await response.json();

// Return the count of contributions
return data.length;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/profile/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { redirect } from '@sveltejs/kit';
import type { Actions, PageServerLoad } from './$types';
import { countGithubProjects } from '$lib/utils/countGithubProjects';
import { getGithubUsername } from '$lib/utils/getGithubUsername';
import { fetchGitHubContributionsCount } from '$lib/utils/fetchGithubContributions';
import { fetchGitHubContributionsCount } from '$lib/utils/getGithubContributions';
import { getGitHubUserIdFromImageUrl } from '$lib/utils/getGithubIDFromImage';
import { prisma } from '$lib/server/prisma';
import { fail, superValidate } from 'sveltekit-superforms';
Expand Down

0 comments on commit bb743ca

Please sign in to comment.