MCPcopy Index your code
hub / github.com/Peppermint-Lab/peppermint / getUserEmails

Function getUserEmails

apps/api/src/controllers/auth.ts:25–37  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

23const cache = new LRUCache(options);
24
25async function getUserEmails(token: string) {
26 const res = await axios.get("https://api.github.com/user/emails", {
27 headers: {
28 Authorization: `token ${token}`,
29 },
30 });
31
32 // Return only the primary email address
33 const primaryEmail = res.data.find(
34 (email: { primary: boolean }) => email.primary
35 );
36 return primaryEmail ? primaryEmail.email : null; // Return the email or null if not found
37}
38
39function generateRandomPassword(length: number): string {
40 const charset =

Callers 1

authRoutesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected