Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-155
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-155
2021-155
Commits
f888e3df
Commit
f888e3df
authored
Jul 02, 2021
by
Kamal Thennakoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable dynamic portfolio generation
parent
b07f65fd
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
220 deletions
+251
-220
client/actions/portfolio.js
client/actions/portfolio.js
+34
-12
client/pages/portfolio/[username].js
client/pages/portfolio/[username].js
+217
-208
No files found.
client/actions/portfolio.js
View file @
f888e3df
import
Axios
from
"
axios
"
;
import
Axios
from
'
axios
'
export
async
function
getGithubInfo
(
username
){
const
url
=
`http://localhost:3001/api/stat/?username=
${
username
}
`
;
try
{
const
response
=
await
Axios
.
get
(
url
);
const
data
=
response
.
data
;
console
.
log
(
data
);
return
data
;
export
async
function
getGithubInfo
(
username
)
{
const
url
=
`http://localhost:3001/api/stat/?username=
${
username
}
`
try
{
const
response
=
await
Axios
.
get
(
url
)
const
data
=
response
.
data
console
.
log
(
data
)
return
data
}
catch
(
err
)
{
console
.
log
(
'
REST error:
'
,
err
);
return
err
;
}
}
}
catch
(
err
){
console
.
log
(
'
REST error:
'
,
err
);
export
async
function
saveGithubInfo
(
userInfo
)
{
console
.
log
(
'
here we go
'
,
userInfo
);
try
{
const
response
=
await
Axios
({
method
:
'
POST
'
,
url
:
'
http://localhost:8000/api/user/save-git-info
'
,
data
:
{
name
:
userInfo
.
summary
.
name
,
username
:
userInfo
.
summary
.
name
,
avatar_url
:
userInfo
.
user
.
avatar
,
level
:
userInfo
.
summary
.
rank
.
level
,
score
:
userInfo
.
summary
.
rank
.
score
}
});
console
.
log
(
response
);
return
response
;
}
catch
(
error
)
{
console
.
log
(
'
errrorIss
'
,
error
);
return
error
;
}
}
\ No newline at end of file
}
client/pages/portfolio/[username].js
View file @
f888e3df
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment