feat: changed backend-pg to backend

This commit is contained in:
Akhil Mohan
2024-01-27 19:14:33 +05:30
parent d13eafcef7
commit 66d258f02b
792 changed files with 40298 additions and 40607 deletions
+18
View File
@@ -0,0 +1,18 @@
import { request } from "../config/request";
const INTEGRATION_GITHUB_API_URL = "https://api.github.com";
type TGithubEmail = {
email: string;
primary: boolean;
verified: boolean;
visibility: null | string;
};
export const fetchGithubEmails = async (accessToken: string) => {
const { data } = await request.get<TGithubEmail[]>(`${INTEGRATION_GITHUB_API_URL}/user/emails`, {
headers: {
Authorization: `Bearer ${accessToken}`
}
});
return data;
};