Showing
1 changed file
with
11 additions
and
0 deletions
... | @@ -78,4 +78,15 @@ export const postGithubLogin = (req,res)=>{ | ... | @@ -78,4 +78,15 @@ export const postGithubLogin = (req,res)=>{ |
78 | export const logout = (req,res)=>{ | 78 | export const logout = (req,res)=>{ |
79 | req.logout(); | 79 | req.logout(); |
80 | res.redirect("/"); | 80 | res.redirect("/"); |
81 | +} | ||
82 | + | ||
83 | +const getRepos = async(req,res) =>{ | ||
84 | + const url = "https://api.github.com/users/lsj8706/repos?sort=updated"; | ||
85 | + const latelyRepos = await axios.get(url).then(function(response){ | ||
86 | + return response.data; | ||
87 | + }); | ||
88 | + const fitstRepoName = latelyRepos.[0].name; | ||
89 | + const secondRepoName = latelyRepos.[1].name; | ||
90 | + const firstRepoUrl = latelyRepos.[0].html_url; | ||
91 | + const secondRepoUrl = latelyRepos.[1].html_url; | ||
81 | } | 92 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment