We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2dc682 commit 3f6a7a5Copy full SHA for 3f6a7a5
1 file changed
‎utils/getEmail.js‎
@@ -9,14 +9,20 @@ const io = require("console-read-write");
9
const { cyan } = require("chalk");
10
const box = require("./box");
11
const axios = require("axios");
12
+const headers = require("./auth");
13
14
module.exports = async () => {
15
io.write("------------------------------------------");
16
// getting data from terminal
17
io.write(cyan("> Enter GitHub Username"));
18
const URL = await io.read();
19
await axios
- .get(`https://api.github.com/users/${URL}/events/public`)
20
+ .get(
21
+ `https://api.github.com/users/${URL}/events/public?access_token=${headers.Authorization}`,
22
+ {
23
+ headers: headers,
24
+ }
25
+ )
26
.then((res) => {
27
for (let i = 0; i < res.data.length; i++) {
28
if (res.data[i].type === "PushEvent") {
0 commit comments