MCPcopy Create free account
hub / github.com/codemistic/Web-Development / getUser

Function getUser

script1.js:5–15  ·  view source on GitHub ↗
(username)

Source from the content-addressed store, hash-verified

3const form = document.getElementById('form')
4const search = document.getElementById('search')
5async function getUser(username) {
6try {
7const { data } = await axios(APIURL + username)
8createUserCard(data)
9getRepos(username)
10} catch(err) {
11if(err.response.status == 404) {
12createErrorCard('No profile with this username')
13}
14}
15}
16async function getRepos(username) {
17try {
18const { data } = await axios(APIURL + username + '/repos?sort=created')

Callers 1

script1.jsFile · 0.70

Calls 3

createUserCardFunction · 0.70
getReposFunction · 0.70
createErrorCardFunction · 0.70

Tested by

no test coverage detected