mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 01:38:05 +00:00
feat: changed backend-pg to backend
This commit is contained in:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user