This commit is contained in:
2026-01-30 07:55:55 +01:00
parent 7169e467cc
commit b6fa30a3f2
10 changed files with 80 additions and 71 deletions
@@ -1,40 +1,7 @@
import { GithubUserPayload } from "../../../types";
import dbHandler from "../../backend/dbHandler";
import httpsRequest from "../../backend/httpsRequest";
export interface GithubUserPayload {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: string;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
}
type Param = {
code: string;
clientId: string;
@@ -92,10 +59,10 @@ export default async function githubLogin({
gitHubUser.email = existingGithubUser[0].email;
}
}
} catch (/** @type {any} */ error: any) {
} catch (error: any) {
console.log(
"ERROR in githubLogin.ts backend function =>",
error.message
error.message,
);
}