JungSeungHyun

getRepos

......@@ -78,4 +78,15 @@ export const postGithubLogin = (req,res)=>{
export const logout = (req,res)=>{
req.logout();
res.redirect("/");
}
const getRepos = async(req,res) =>{
const url = "https://api.github.com/users/lsj8706/repos?sort=updated";
const latelyRepos = await axios.get(url).then(function(response){
return response.data;
});
const fitstRepoName = latelyRepos.[0].name;
const secondRepoName = latelyRepos.[1].name;
const firstRepoUrl = latelyRepos.[0].html_url;
const secondRepoUrl = latelyRepos.[1].html_url;
}
\ No newline at end of file
......