Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이세진
/
dev-profile
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
10
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
JungSeungHyun
2021-05-25 13:57:44 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
db9cd18234d85508a6bfafefb75fccd4ecaafd2c
db9cd182
1 parent
1f36c8a4
getRepos
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
src/controllers/userController.js
src/controllers/userController.js
View file @
db9cd18
...
...
@@ -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
...
...
Please
register
or
login
to post a comment