JungSeungHyun

getRepos

...@@ -79,3 +79,14 @@ export const logout = (req,res)=>{ ...@@ -79,3 +79,14 @@ export const logout = (req,res)=>{
79 req.logout(); 79 req.logout();
80 res.redirect("/"); 80 res.redirect("/");
81 } 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;
92 +}
...\ No newline at end of file ...\ No newline at end of file
......